OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <a id=test href="javascript:popup()">test</a> | 6 <a id=test href="javascript:popup()">test</a> |
7 <div id="console"></div> | 7 <div id="console"></div> |
8 <script> | 8 <script> |
9 var win; | 9 var win; |
10 function popup() { | 10 function popup() { |
11 win = window.open('about:blank','blank','height=200,width=200'); | 11 win = window.open('about:blank','blank','height=200,width=200'); |
12 shouldBeUndefined("win"); | 12 shouldBeUndefined("win"); |
13 } | 13 } |
14 | 14 |
15 if (window.testRunner) { | 15 if (window.testRunner) { |
16 testRunner.dumpAsText(); | 16 testRunner.dumpAsText(); |
17 testRunner.setCanOpenWindows(); | 17 testRunner.setCanOpenWindows(); |
18 testRunner.setPopupBlockingEnabled(true); | 18 testRunner.setPopupBlockingEnabled(true); |
19 testRunner.setCloseRemainingWindowsWhenComplete(true); | 19 testRunner.setCloseRemainingWindowsWhenComplete(true); |
20 testRunner.waitUntilDone(); | 20 testRunner.waitUntilDone(); |
21 } | 21 } |
22 | 22 |
23 clickEvent = document.createEvent("MouseEvents"); | 23 clickEvent = document.createEvent("MouseEvents"); |
24 clickEvent.initEvent("click", true, true, document.defaultView, 0, 0
, 0, 0, 0, false, false, false, false, 0, null); | 24 clickEvent.initEvent("click", true, true, document.defaultView, 0, 0
, 0, 0, 0, false, false, false, false, 0, null); |
25 document.getElementById("test").dispatchEvent(clickEvent); | 25 document.getElementById("test").dispatchEvent(clickEvent); |
26 | 26 |
27 if (window.testRunner) | 27 if (window.testRunner) |
28 testRunner.notifyDone(); | 28 testRunner.notifyDone(); |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |