Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
<!--
-->
<window title="Mozilla Bug 1098074"
onload="start();">
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
/** Test for Bug 1098074 **/
SimpleTest.waitForExplicitFinish();
SimpleTest.expectUncaughtException();
// Tell the test to expect exactly one console error with the given parameters,
// with SimpleTest.finish as a continuation function.
SimpleTest.monitorConsole(SimpleTest.finish, [{errorMessage: new RegExp('acopia')}]);
var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService();
globalMM.addMessageListener("flimfniffle", function onMessage(msg) {
globalMM.removeMessageListener("flimfniffle", onMessage);
is(msg.data, "teufeltor", "correct message");
// Cleanup the monitor after we throw.
SimpleTest.executeSoon(SimpleTest.endMonitorConsole);
// eslint-disable-next-line no-throw-literal
throw "acopia";
});
function start() {
globalMM.loadFrameScript("data:,sendAsyncMessage('flimfniffle', 'teufeltor')", true);
}
]]>
</script>
<!-- test results are displayed in the html:body -->
target="_blank">Mozilla Bug 1098074</a>
</body>
</window>