|
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 } |
|
15 |
|
16 window.onload = function() { |
|
17 navigateByLocation(frames[0]); |
|
18 navigateByOpen("child1"); |
|
19 navigateByForm("child2"); |
|
20 navigateByHyperlink("child3"); |
|
21 |
|
22 xpcWaitForFinishedFrames(function() { |
|
23 isNavigated(frames[0], "Should be able to navigate off-domain child by setting location."); |
|
24 isNavigated(frames[1], "Should be able to navigate off-domain child by calling window.open."); |
|
25 isNavigated(frames[2], "Should be able to navigate off-domain child by submitting form."); |
|
26 isNavigated(frames[3], "Should be able to navigate off-domain child by targeted hyperlink."); |
|
27 |
|
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/blank.html"></iframe> |
|
38 <iframe name="child1" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> |
|
39 <iframe name="child2" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> |
|
40 <iframe name="child3" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> |
|
41 </div> |
|
42 <pre id="test"> |
|
43 <script type="text/javascript"> |
|
44 SimpleTest.waitForExplicitFinish(); |
|
45 </script> |
|
46 </pre> |
|
47 </body> |
|
48 </html> |