docshell/test/navigation/test_child.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4     <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     5     <script type="text/javascript" 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 }
    16 window.onload = function() {
    17   navigateByLocation(frames[0]);
    18   navigateByOpen("child1");
    19   navigateByForm("child2");
    20   navigateByHyperlink("child3");
    22   xpcWaitForFinishedFrames(function() {
    23     isNavigated(frames[0], "Should be able to navigate off-domain child by setting location.");
    24     isNavigated(frames[1], "Should be able to navigate off-domain child by calling window.open.");
    25     isNavigated(frames[2], "Should be able to navigate off-domain child by submitting form.");
    26     isNavigated(frames[3], "Should be able to navigate off-domain child by targeted hyperlink.");
    28     xpcCleanupWindows();
    29     SimpleTest.finish();
    30   }, 4);
    31 }
    32 </script>
    33 </head>
    34 <body>
    35 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a>
    36 <div id="frames">
    37 <iframe name="child0" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    38 <iframe name="child1" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    39 <iframe name="child2" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    40 <iframe name="child3" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    41 </div>
    42 <pre id="test">
    43 <script type="text/javascript">
    44 SimpleTest.waitForExplicitFinish();
    45 </script>
    46 </pre>
    47 </body>
    48 </html>

mercurial