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

Side by Side Diff: tests/html/xhr_tests.dart

Issue 10191033: test renaming overhaul: step 4 client tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 void testXHR() { 6 void testXHR() {
7 print(window.location.href); 7 print(window.location.href);
8 asyncTest('XHR', 1, () { 8 asyncTest('XHR', 1, () {
9 XMLHttpRequest xhr = new XMLHttpRequest(); 9 XMLHttpRequest xhr = new XMLHttpRequest();
10 xhr.open("GET", "NonExistingFile", true); 10 xhr.open("GET", "NonExistingFile", true);
11 xhr.on.readyStateChange.add((event) { 11 xhr.on.readyStateChange.add((event) {
12 if (xhr.readyState == 4) { 12 if (xhr.readyState == 4) {
13 Expect.equals(0, xhr.status); 13 Expect.equals(0, xhr.status);
14 Expect.stringEquals('', xhr.responseText); 14 Expect.stringEquals('', xhr.responseText);
15 callbackDone(); 15 callbackDone();
16 } 16 }
17 }); 17 });
18 xhr.send(); 18 xhr.send();
19 }); 19 });
20 } 20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698