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

Unified Diff: tests/html/xhr_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/xhr_test.dart
===================================================================
--- tests/html/xhr_test.dart (revision 7823)
+++ tests/html/xhr_test.dart (working copy)
@@ -11,25 +11,23 @@
useHtmlConfiguration();
print(window.location.href);
- asyncTest('XHR', 1, () {
+ test('XHR', () {
XMLHttpRequest xhr = new XMLHttpRequest();
xhr.open("GET", "NonExistingFile", true);
- xhr.on.readyStateChange.add((event) {
+ xhr.on.readyStateChange.add(expectAsync1((event) {
if (xhr.readyState == 4) {
Expect.equals(0, xhr.status);
Expect.stringEquals('', xhr.responseText);
- callbackDone();
}
- });
+ }));
xhr.send();
});
- asyncTest('XHR.get', 1, () {
- new XMLHttpRequest.get("NonExistingFile", (xhr) {
+ test('XHR.get', () {
+ new XMLHttpRequest.get("NonExistingFile", expectAsync1((xhr) {
Expect.equals(XMLHttpRequest.DONE, xhr.readyState);
Expect.equals(0, xhr.status);
Expect.stringEquals('', xhr.responseText);
- callbackDone();
- });
+ }));
});
}

Powered by Google App Engine
This is Rietveld 408576698