Thu, 22 Jan 2015 13:21:57 +0100
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: 50px; }
10 </style>
11 <script>
12 if (!navigator.platform.startsWith("Win")) {
13 SimpleTest.expectAssertions(0, 1);
14 }
16 window.onload = function () {
17 //navigateByLocation(window0); // Don't have a handle to the window.
18 navigateByOpen("window1");
19 navigateByForm("window2");
20 navigateByHyperlink("window3");
22 xpcWaitForFinishedFrames(function() {
23 is(xpcGetFramesByName("window1").length, 2, "Should not be able to navigate popup's popup by calling window.open.");
24 is(xpcGetFramesByName("window2").length, 2, "Should not be able to navigate popup's popup by submitting form.");
25 is(xpcGetFramesByName("window3").length, 2, "Should not be able to navigate popup's popup by targeted hyperlink.");
27 //opener0.close();
28 opener1.close();
29 opener2.close();
30 opener3.close();
32 xpcCleanupWindows();
33 SimpleTest.finish();
34 }, 6);
35 }
37 //opener0 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window0", "_blank", "width=10,height=10");
38 opener1 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window1", "_blank", "width=10,height=10");
39 opener2 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window2", "_blank", "width=10,height=10");
40 opener3 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window3", "_blank", "width=10,height=10");
41 </script>
42 </head>
43 <body>
44 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a>
45 <pre id="test">
46 <script type="text/javascript">
47 SimpleTest.waitForExplicitFinish();
48 </script>
49 </pre>
50 </body>
51 </html>