OLD | NEW |
1 #library('WindowOpenTest'); | 1 #library('WindowOpenTest'); |
2 #import('../../pkg/unittest/unittest.dart'); | 2 #import('../../pkg/unittest/lib/unittest.dart'); |
3 #import('../../pkg/unittest/html_config.dart'); | 3 #import('../../pkg/unittest/lib/html_config.dart'); |
4 #import('dart:html'); | 4 #import('dart:html'); |
5 | 5 |
6 main() { | 6 main() { |
7 evaluateJavaScript(code) { | 7 evaluateJavaScript(code) { |
8 final scriptTag = new Element.tag('script'); | 8 final scriptTag = new Element.tag('script'); |
9 scriptTag.innerHTML = code; | 9 scriptTag.innerHTML = code; |
10 document.body.nodes.add(scriptTag); | 10 document.body.nodes.add(scriptTag); |
11 } | 11 } |
12 evaluateJavaScript('(testRunner || layoutTestController).setCanOpenWindows()')
; | 12 evaluateJavaScript('(testRunner || layoutTestController).setCanOpenWindows()')
; |
13 | 13 |
(...skipping 10 matching lines...) Expand all Loading... |
24 | 24 |
25 closeWindow(win) { | 25 closeWindow(win) { |
26 win.close(); | 26 win.close(); |
27 doneHandler() { | 27 doneHandler() { |
28 if (!win.closed) { | 28 if (!win.closed) { |
29 window.setTimeout(expectAsync0(doneHandler), 1); | 29 window.setTimeout(expectAsync0(doneHandler), 1); |
30 } | 30 } |
31 } | 31 } |
32 window.setTimeout(expectAsync0(doneHandler), 1); | 32 window.setTimeout(expectAsync0(doneHandler), 1); |
33 } | 33 } |
OLD | NEW |