CLOSED TREE: TraceMonkey merge head. (a=blockers)
[mozilla-central.git] / docshell / test / navigation / test_opener.html
blob7620ddf65a974da42a1c9944661e40422ed020f2
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script type="text/javascript" src="/MochiKit/packed.js"></script>
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
6 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
8 <script type="text/javascript" src="NavigationUtils.js"></script>
9 <style type="text/css">
10 iframe { width: 90%; height: 50px; }
11 </style>
12 <script>
13 window.onload = function () {
14 navigateByLocation(window0);
15 navigateByOpen("window1");
16 navigateByForm("window2");
17 navigateByHyperlink("window3");
19 xpcWaitForFinishedFrames(function() {
20 isNavigated(window0, "Should be able to navigate popup by setting location.");
21 isNavigated(window1, "Should be able to navigate popup by calling window.open.");
22 isNavigated(window2, "Should be able to navigate popup by submitting form.");
23 isNavigated(window3, "Should be able to navigate popup by targeted hyperlink.");
25 window0.close();
26 window1.close();
27 window2.close();
28 window3.close();
30 xpcCleanupWindows();
31 SimpleTest.finish();
32 }, 4);
35 var window0 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window0", "width=10,height=10");
36 var window1 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window1", "width=10,height=10");
37 var window2 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window2", "width=10,height=10");
38 var window3 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window3", "width=10,height=10");
39 </script>
40 </head>
41 <body>
42 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a>
43 <pre id="test">
44 <script type="text/javascript">
45 SimpleTest.waitForExplicitFinish();
46 </script>
47 </pre>
48 </body>
49 </html>