| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 | |
| 6 void testXHR() { | |
| 7 print(window.location.href); | |
| 8 asyncTest('XHR', 1, () { | |
| 9 XMLHttpRequest xhr = new XMLHttpRequest(); | |
| 10 xhr.open("GET", "NonExistingFile", true); | |
| 11 xhr.on.readyStateChange.add((event) { | |
| 12 if (xhr.readyState == 4) { | |
| 13 Expect.equals(0, xhr.status); | |
| 14 Expect.stringEquals('', xhr.responseText); | |
| 15 callbackDone(); | |
| 16 } | |
| 17 }); | |
| 18 xhr.send(); | |
| 19 }); | |
| 20 } | |
| OLD | NEW |