Index: tests/html/xhr_cross_origin_test.dart |
diff --git a/tests/html/xhr_cross_origin_test.dart b/tests/html/xhr_cross_origin_test.dart |
index a9eda406fb9e35f3cdfd1a010308d8a1a420d587..5a0f6cb61b8a5d05838b88666356466f5c0f8f15 100644 |
--- a/tests/html/xhr_cross_origin_test.dart |
+++ b/tests/html/xhr_cross_origin_test.dart |
@@ -6,7 +6,7 @@ library XHRCrossOriginTest; |
import '../../pkg/unittest/lib/unittest.dart'; |
import '../../pkg/unittest/lib/html_individual_config.dart'; |
import 'dart:html'; |
-import 'dart:json' as json; |
+import "dart:convert"; |
/** |
* Examine the value of "crossOriginPort" as passed in from the url from |
@@ -42,7 +42,7 @@ main() { |
var gotError = false; |
var url = '$host/root_dart/tests/html/xhr_cross_origin_data.txt'; |
return HttpRequest.request(url).then((xhr) { |
- var data = json.parse(xhr.response); |
+ var data = JSON.decode(xhr.response); |
expect(data, contains('feed')); |
expect(data['feed'], contains('entry')); |
expect(data, isMap); |
@@ -92,7 +92,7 @@ main() { |
xhr.onReadyStateChange.listen((e) { |
guardAsync(() { |
if (xhr.readyState == HttpRequest.DONE) { |
- validate(json.parse(xhr.response)); |
+ validate(JSON.decode(xhr.response)); |
} |
}); |
}); |
@@ -102,7 +102,7 @@ main() { |
test('XHR.getWithCredentials Cross-domain', () { |
var url = '$host/root_dart/tests/html/xhr_cross_origin_data.txt'; |
return HttpRequest.request(url, withCredentials: true).then((xhr) { |
- var data = json.parse(xhr.response); |
+ var data = JSON.decode(xhr.response); |
expect(data, contains('feed')); |
expect(data['feed'], contains('entry')); |
expect(data, isMap); |