tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_jsimplemented_cross_realm_this.html (1081B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1464374-->
      5 <head>
      6  <meta charset="utf-8">
      7  <title>Test for Bug 1464374</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1464374">Mozilla Bug 1464374</a>
     13 <p id="display"></p>
     14 <div id="content" style="display: none">
     15 
     16 </div>
     17 <pre id="test">
     18 </pre>
     19 
     20 <iframe></iframe>
     21 <script type="application/javascript">
     22  /* global TestInterfaceJS */
     23  /** Test for Bug 1464374 */
     24  SimpleTest.waitForExplicitFinish();
     25 
     26  function doTest() {
     27    var frame = frames[0];
     28    var obj = new frame.TestInterfaceJS();
     29    var ex;
     30    try {
     31      TestInterfaceJS.prototype.testThrowTypeError.call(obj);
     32    } catch (e) {
     33      ex = e;
     34    }
     35    ok(ex, "Should have an exception");
     36    SimpleTest.finish();
     37  }
     38 
     39  SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
     40                            doTest);
     41 </script>
     42 
     43 </body>
     44 </html>