Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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: 50px; } |
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(window0); // Don't have a handle to the window. |
michael@0 | 18 | navigateByOpen("window1"); |
michael@0 | 19 | navigateByForm("window2"); |
michael@0 | 20 | navigateByHyperlink("window3"); |
michael@0 | 21 | |
michael@0 | 22 | xpcWaitForFinishedFrames(function() { |
michael@0 | 23 | is(xpcGetFramesByName("window1").length, 2, "Should not be able to navigate popup's popup by calling window.open."); |
michael@0 | 24 | is(xpcGetFramesByName("window2").length, 2, "Should not be able to navigate popup's popup by submitting form."); |
michael@0 | 25 | is(xpcGetFramesByName("window3").length, 2, "Should not be able to navigate popup's popup by targeted hyperlink."); |
michael@0 | 26 | |
michael@0 | 27 | //opener0.close(); |
michael@0 | 28 | opener1.close(); |
michael@0 | 29 | opener2.close(); |
michael@0 | 30 | opener3.close(); |
michael@0 | 31 | |
michael@0 | 32 | xpcCleanupWindows(); |
michael@0 | 33 | SimpleTest.finish(); |
michael@0 | 34 | }, 6); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | //opener0 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window0", "_blank", "width=10,height=10"); |
michael@0 | 38 | opener1 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window1", "_blank", "width=10,height=10"); |
michael@0 | 39 | opener2 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window2", "_blank", "width=10,height=10"); |
michael@0 | 40 | opener3 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/open.html#window3", "_blank", "width=10,height=10"); |
michael@0 | 41 | </script> |
michael@0 | 42 | </head> |
michael@0 | 43 | <body> |
michael@0 | 44 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a> |
michael@0 | 45 | <pre id="test"> |
michael@0 | 46 | <script type="text/javascript"> |
michael@0 | 47 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 48 | </script> |
michael@0 | 49 | </pre> |
michael@0 | 50 | </body> |
michael@0 | 51 | </html> |