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

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

mercurial