|
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 <script> |
|
9 window.onload = function () { |
|
10 document.getElementById("link0").href = target_url; |
|
11 sendMouseEvent({type:"click"}, "link0"); |
|
12 |
|
13 xpcWaitForFinishedFrames(function() { |
|
14 var array_of_frames = xpcGetFramesByName("window0"); |
|
15 is(array_of_frames.length, 1, "Should only open one window using a fancy hyperlink."); |
|
16 |
|
17 for (var i=0; i < array_of_frames.length; ++i) |
|
18 array_of_frames[i].close(); |
|
19 |
|
20 xpcCleanupWindows(); |
|
21 SimpleTest.finish(); |
|
22 }, 1); |
|
23 } |
|
24 </script> |
|
25 </head> |
|
26 <body> |
|
27 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=278916">Mozilla Bug 278916</a> |
|
28 <div id="links"> |
|
29 <a id="link0" target="window0" onclick="window.open('', 'window0', 'width=10,height=10');">This is a fancy hyperlink</a> |
|
30 </div> |
|
31 <pre id="test"> |
|
32 <script type="text/javascript"> |
|
33 SimpleTest.waitForExplicitFinish(); |
|
34 </script> |
|
35 </pre> |
|
36 </body> |
|
37 </html> |