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 | function testChild0() { |
michael@0 | 13 | if (!window.window0) |
michael@0 | 14 | window0 = window.open("navigate.html#opener.frames[0],location", "window0", "width=10,height=10"); |
michael@0 | 15 | } |
michael@0 | 16 | |
michael@0 | 17 | function testChild1() { |
michael@0 | 18 | if (!window.window1) |
michael@0 | 19 | window1 = window.open("navigate.html#child1,open", "window1", "width=10,height=10"); |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | function testChild2() { |
michael@0 | 23 | if (!window.window2) |
michael@0 | 24 | window2 = window.open("navigate.html#child2,form", "window2", "width=10,height=10"); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | function testChild3() { |
michael@0 | 28 | if (!window.window3) |
michael@0 | 29 | window3 = window.open("navigate.html#child3,hyperlink", "window3", "width=10,height=10"); |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | xpcWaitForFinishedFrames(function() { |
michael@0 | 33 | isNavigated(frames[0], "Should be able to navigate on-domain opener's children by setting location."); |
michael@0 | 34 | isNavigated(frames[1], "Should be able to navigate on-domain opener's children by calling window.open."); |
michael@0 | 35 | isNavigated(frames[2], "Should be able to navigate on-domain opener's children by submitting form."); |
michael@0 | 36 | isNavigated(frames[3], "Should be able to navigate on-domain opener's children by targeted hyperlink."); |
michael@0 | 37 | |
michael@0 | 38 | window0.close(); |
michael@0 | 39 | window1.close(); |
michael@0 | 40 | window2.close(); |
michael@0 | 41 | window3.close(); |
michael@0 | 42 | |
michael@0 | 43 | xpcCleanupWindows(); |
michael@0 | 44 | SimpleTest.finish(); |
michael@0 | 45 | }, 4); |
michael@0 | 46 | |
michael@0 | 47 | </script> |
michael@0 | 48 | </head> |
michael@0 | 49 | <body> |
michael@0 | 50 | <div id="frames"> |
michael@0 | 51 | <iframe onload="testChild0()" name="child0" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> |
michael@0 | 52 | <iframe onload="testChild1()" name="child1" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> |
michael@0 | 53 | <iframe onload="testChild2()" name="child2" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> |
michael@0 | 54 | <iframe onload="testChild3()" name="child3" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> |
michael@0 | 55 | </div> |
michael@0 | 56 | <pre id="test"> |
michael@0 | 57 | <script type="text/javascript"> |
michael@0 | 58 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 59 | </script> |
michael@0 | 60 | </pre> |
michael@0 | 61 | </body> |
michael@0 | 62 | </html> |