| Index: tests/html/xhr_test.dart
|
| diff --git a/tests/html/xhr_test.dart b/tests/html/xhr_test.dart
|
| index b971f9d1e74e4b193a7dcdc451fe3eed950fc2f9..ec5a7339320b680b5c8bb2dba16af3c542a1101d 100644
|
| --- a/tests/html/xhr_test.dart
|
| +++ b/tests/html/xhr_test.dart
|
| @@ -6,28 +6,28 @@
|
| #import('../../lib/unittest/unittest.dart');
|
| #import('../../lib/unittest/html_config.dart');
|
| #import('dart:html');
|
| +#import('dart:json');
|
|
|
| main() {
|
| useHtmlConfiguration();
|
|
|
| - print(window.location.href);
|
| - test('XHR', () {
|
| + test('XHR No file', () {
|
| XMLHttpRequest xhr = new XMLHttpRequest();
|
| xhr.open("GET", "NonExistingFile", true);
|
| xhr.on.readyStateChange.add(expectAsync1((event) {
|
| - if (xhr.readyState == 4) {
|
| - Expect.equals(0, xhr.status);
|
| - Expect.stringEquals('', xhr.responseText);
|
| - }
|
| - }));
|
| + if (xhr.readyState == XMLHttpRequest.DONE) {
|
| + expect(xhr.status, equals(0));
|
| + expect(xhr.responseText, equals(''));
|
| + }
|
| + }));
|
| xhr.send();
|
| });
|
|
|
| - test('XHR.get', () {
|
| - new XMLHttpRequest.get("NonExistingFile", expectAsync1((xhr) {
|
| - Expect.equals(XMLHttpRequest.DONE, xhr.readyState);
|
| - Expect.equals(0, xhr.status);
|
| - Expect.stringEquals('', xhr.responseText);
|
| - }));
|
| + test('XHR.get No file', () {
|
| + new XMLHttpRequest.get("NonExistingFile", expectAsync1((xhr) {
|
| + expect(xhr.readyState, equals(XMLHttpRequest.DONE));
|
| + expect(xhr.status, equals(0));
|
| + expect(xhr.responseText, equals(''));
|
| + }));
|
| });
|
| }
|
|
|