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 cb56240317d654bb84b42d85b718bc9a035c473f..fedf66ce25bac4f39a88752fba5ccb89883f932b 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); |
@@ -73,7 +73,7 @@ main() { |
xhr.onReadyStateChange.listen((e) { |
guardAsync(() { |
if (xhr.readyState == HttpRequest.DONE) { |
- validate(json.parse(xhr.response)); |
+ validate(JSON.decode(xhr.response)); |
} |
}); |
}); |
@@ -83,7 +83,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); |