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 d39af2c85e388bcfdb6e6e60f0f352ff50b9f429..e01b285cfa14c7af836760bbba57935161f175c1 100644 |
--- a/tests/html/xhr_cross_origin_test.dart |
+++ b/tests/html/xhr_cross_origin_test.dart |
@@ -11,8 +11,10 @@ import 'dart:json'; |
main() { |
useHtmlConfiguration(); |
+ var port = getCrossOriginPortNumber(); |
+ |
test('XHR Cross-domain', () { |
- var url = "http://localhost:9876/tests/html/xhr_cross_origin_data.txt"; |
+ var url = "http://localhost:$port/tests/html/xhr_cross_origin_data.txt"; |
var xhr = new HttpRequest(); |
xhr.open('GET', url, true); |
var validate = expectAsync1((data) { |
@@ -31,7 +33,7 @@ main() { |
}); |
test('XHR.get Cross-domain', () { |
- var url = "http://localhost:9876/tests/html/xhr_cross_origin_data.txt"; |
+ var url = "http://localhost:$port/tests/html/xhr_cross_origin_data.txt"; |
new HttpRequest.get(url, expectAsync1((xhr) { |
var data = JSON.parse(xhr.response); |
expect(data, contains('feed')); |
@@ -39,4 +41,14 @@ main() { |
expect(data, isMap); |
})); |
}); |
+ |
+ test('XHR.getWithCredentials Cross-domain', () { |
+ var url = "http://localhost:$port/tests/html/xhr_cross_origin_data.txt"; |
+ new HttpRequest.getWithCredentials(url, expectAsync1((xhr) { |
+ var data = JSON.parse(xhr.response); |
+ expect(data, contains('feed')); |
+ expect(data['feed'], contains('entry')); |
+ expect(data, isMap); |
+ })); |
+ }); |
} |