4 https://bugzilla.mozilla.org/show_bug.cgi?id=1295322
8 <title>Test for Bug
1295322</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1295322">Mozilla Bug
1295322</a>
15 <div id=
"content" style=
"display: none">
20 <script type=
"application/javascript">
21 /* global TestFunctions */
22 SimpleTest.waitForExplicitFinish();
23 async function runTests() {
24 await SpecialPowers.pushPrefEnv({set: [[
"dom.expose_test_interfaces", true]]});
26 var t = new TestFunctions();
29 t.testThrowNsresult();
32 is(e.name,
"NS_BINDING_ABORTED",
"Should have the right exception");
33 is(e.filename, location.href,
"Should not be seeing where the exception really came from");
35 ok(false,
"Should be able to work with the exception");
40 t.testThrowNsresultFromNative();
43 is(e.name,
"NS_ERROR_UNEXPECTED",
"Should have the right exception");
44 is(e.filename, location.href,
"Should not be seeing where the exception really came from");
46 ok(false,
"Should be able to work with the exception");