docshell/test/navigation/test_grandchild.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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: 200px; }
    10     </style>
    11 <script>
    12 if (!navigator.platform.startsWith("Win")) {
    13   SimpleTest.expectAssertions(0, 1);
    14 }
    16 window.onload = function () {
    17   navigateByLocation(frames[0].frames[0]);
    18   navigateByOpen("child1_child0");
    19   navigateByForm("child2_child0");
    20   navigateByHyperlink("child3_child0");
    22   xpcWaitForFinishedFrames(function() {
    23     isNavigated(frames[0].frames[0], "Should be able to navigate off-domain grandchild by setting location.");
    24     isNavigated(frames[1].frames[0], "Should be able to navigate off-domain grandchild by calling window.open.");
    25     isNavigated(frames[2].frames[0], "Should be able to navigate off-domain grandchild by submitting form.");
    26     isNavigated(frames[3].frames[0], "Should be able to navigate off-domain grandchild 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/parent.html"></iframe>
    38 <iframe name="child1" src="http://test1.example.org:80/tests/docshell/test/navigation/parent.html"></iframe>
    39 <iframe name="child2" src="http://test1.example.org:80/tests/docshell/test/navigation/parent.html"></iframe>
    40 <iframe name="child3" src="http://test1.example.org:80/tests/docshell/test/navigation/parent.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