| 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 d4dbecdc13a83f8a0165343f08a1bb31f32a238d..baa4282cd9a7bea1d70d11fbb8627bac403e6dfe 100644
|
| --- a/tests/html/xhr_cross_origin_test.dart
|
| +++ b/tests/html/xhr_cross_origin_test.dart
|
| @@ -28,12 +28,13 @@ main() {
|
| useHtmlConfiguration();
|
|
|
| var port = crossOriginPort;
|
| + var host = '${window.location.protocol}//${window.location.hostname}:$port';
|
|
|
| test('XHR Cross-domain', () {
|
| - var url = "http://localhost:$port/"
|
| - "root_dart/tests/html/xhr_cross_origin_data.txt";
|
| + var url = '$host/root_dart/tests/html/xhr_cross_origin_data.txt';
|
| var xhr = new HttpRequest();
|
| xhr.open('GET', url, async: true);
|
| + xhr.withCredentials = true;
|
| var validate = expectAsync1((data) {
|
| expect(data, contains('feed'));
|
| expect(data['feed'], contains('entry'));
|
| @@ -50,8 +51,7 @@ main() {
|
| });
|
|
|
| test('XHR.get Cross-domain', () {
|
| - var url = "http://localhost:$port/"
|
| - "root_dart/tests/html/xhr_cross_origin_data.txt";
|
| + var url = '$host/root_dart/tests/html/xhr_cross_origin_data.txt';
|
| HttpRequest.request(url).then(expectAsync1((xhr) {
|
| var data = json.parse(xhr.response);
|
| expect(data, contains('feed'));
|
| @@ -61,8 +61,7 @@ main() {
|
| });
|
|
|
| test('XHR.getWithCredentials Cross-domain', () {
|
| - var url = "http://localhost:$port/"
|
| - "root_dart/tests/html/xhr_cross_origin_data.txt";
|
| + var url = '$host/root_dart/tests/html/xhr_cross_origin_data.txt';
|
| HttpRequest.request(url, withCredentials: true).then(expectAsync1((xhr) {
|
| var data = json.parse(xhr.response);
|
| expect(data, contains('feed'));
|
|
|