tor-browser

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

test_child.html (1827B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <script src="/tests/SimpleTest/SimpleTest.js"></script>
      5    <script src="/tests/SimpleTest/EventUtils.js"></script>
      6    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      7    <script type="text/javascript" src="NavigationUtils.js"></script>
      8    <style type="text/css">
      9      iframe { width: 90%; height: 50px; }
     10    </style>
     11 <script>
     12 if (!navigator.platform.startsWith("Win")) {
     13  SimpleTest.expectAssertions(0, 1);
     14 }
     15 
     16 window.onload = async function() {
     17  navigateByLocation(frames[0]);
     18  navigateByOpen("child1");
     19  navigateByForm("child2");
     20  navigateByHyperlink("child3");
     21 
     22  await waitForFinishedFrames(4);
     23  await isNavigated(frames[0], "Should be able to navigate off-domain child by setting location.");
     24  await isNavigated(frames[1], "Should be able to navigate off-domain child by calling window.open.");
     25  await isNavigated(frames[2], "Should be able to navigate off-domain child by submitting form.");
     26  await isNavigated(frames[3], "Should be able to navigate off-domain child by targeted hyperlink.");
     27 
     28  await cleanupWindows();
     29  SimpleTest.finish();
     30 };
     31 </script>
     32 </head>
     33 <body>
     34 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a>
     35 <div id="frames">
     36 <iframe name="child0" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
     37 <iframe name="child1" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
     38 <iframe name="child2" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
     39 <iframe name="child3" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
     40 </div>
     41 <pre id="test">
     42 <script type="text/javascript">
     43 SimpleTest.waitForExplicitFinish();
     44 </script>
     45 </pre>
     46 </body>
     47 </html>