Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Unified Diff: tests/html/window_open_test.dart

Issue 10412015: aChange all asyncTest/callbackDone style tests to use the new expectAsync/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/html/window_open_test.dart
===================================================================
--- tests/html/window_open_test.dart (revision 7823)
+++ tests/html/window_open_test.dart (working copy)
@@ -12,11 +12,11 @@
evaluateJavaScript('layoutTestController.setCanOpenWindows()');
useHtmlConfiguration();
- asyncTest('TwoArgumentVersion', 1, () {
+ test('TwoArgumentVersion', () {
Window win = window.open('../resources/pong.html', 'testWindow');
closeWindow(win);
});
- asyncTest('ThreeArgumentVersion', 1, () {
+ test('ThreeArgumentVersion', () {
Window win = window.open("resources/pong.html", "testWindow", "scrollbars=yes,width=75,height=100");
closeWindow(win);
});
@@ -25,7 +25,9 @@
closeWindow(win) {
win.close();
doneHandler() {
- window.setTimeout(win.closed ? callbackDone : doneHandler, 1);
+ if (!win.closed) {
+ window.setTimeout(expectAsync0(doneHandler), 1);
+ }
}
- window.setTimeout(doneHandler, 1);
+ window.setTimeout(expectAsync0(doneHandler), 1);
}

Powered by Google App Engine
This is Rietveld 408576698