tor-browser

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

test_bug1530292.html (1593B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1530292
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 1530292</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script type="application/javascript">
     12 
     13  /** Test for Bug 1530292 */
     14  SimpleTest.waitForExplicitFinish();
     15  addLoadEvent(() => {
     16    // This is really a crashtest, but we need some cross-origin (and hence
     17    // cross-compartment) windows to test it, so can't use the crashtest
     18    // harness.
     19    try {
     20      ({} instanceof frames[0]);
     21      ok(false, "Should have thrown for same-process window");
     22    } catch (e) {
     23      is(e.message, "frames[0] is not a function", "frames[0] is not a function");
     24    }
     25    try {
     26      ({} instanceof frames[1]);
     27      ok(false, "Should have thrown for maybe other-process window");
     28    } catch (e) {
     29      is(e.message, "frames[1] is not a function", "frames[1] is not a function");
     30    }
     31    SimpleTest.finish();
     32  });
     33  </script>
     34 </head>
     35 <body>
     36 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1530292">Mozilla Bug 1530292</a>
     37 <p id="display"></p>
     38 <div id="content" style="display: none">
     39  <!-- Cross-origin but same-site; must be same-process -->
     40  <iframe src="//test1.mochi.test:8888/tests/dom/tests/mochitest/bugs/file_empty.html"></iframe>
     41  <!-- Completely cross-origin; might be cross-process -->
     42  <iframe src="//example.org/tests/dom/tests/mochitest/bugs/file_empty.html"></iframe>
     43 </div>
     44 <pre id="test">
     45 </pre>
     46 </body>
     47 </html>