OLD | NEW |
1 #library('WindowOpenTest'); | 1 #library('WindowOpenTest'); |
2 #import('../../../testing/unittest/unittest.dart'); | 2 #import('../../../testing/unittest/unittest_dom.dart'); |
3 #import('dart:dom'); | 3 #import('dart:dom'); |
4 | 4 |
5 main() { | 5 main() { |
6 // FIXME: when JS DOM has proper layoutTestController support, should go away. | 6 // FIXME: when JS DOM has proper layoutTestController support, should go away. |
7 window.setTimeout(() { | 7 window.setTimeout(() { |
8 evaluateJavaScript(code) { | 8 evaluateJavaScript(code) { |
9 final scriptTag = document.createElement('script'); | 9 final scriptTag = document.createElement('script'); |
10 scriptTag.innerHTML = code; | 10 scriptTag.innerHTML = code; |
11 document.body.appendChild(scriptTag); | 11 document.body.appendChild(scriptTag); |
12 } | 12 } |
(...skipping 11 matching lines...) Expand all Loading... |
24 }); | 24 }); |
25 } | 25 } |
26 | 26 |
27 closeWindow(win) { | 27 closeWindow(win) { |
28 win.close(); | 28 win.close(); |
29 doneHandler() { | 29 doneHandler() { |
30 window.setTimeout(win.closed ? callbackDone : doneHandler, 1); | 30 window.setTimeout(win.closed ? callbackDone : doneHandler, 1); |
31 } | 31 } |
32 window.setTimeout(doneHandler, 1); | 32 window.setTimeout(doneHandler, 1); |
33 } | 33 } |
OLD | NEW |