Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: tests/html/xhr_cross_origin_test.dart

Issue 11800002: "Reverting 16675-16676, 71-73" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/html.status ('k') | tests/html/xhr_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3653bb0bf04209ecadd54a7be1bc5582faa5ba8b..d39af2c85e388bcfdb6e6e60f0f352ff50b9f429 100644
--- a/tests/html/xhr_cross_origin_test.dart
+++ b/tests/html/xhr_cross_origin_test.dart
@@ -8,29 +8,11 @@ import '../../pkg/unittest/lib/html_config.dart';
import 'dart:html';
import 'dart:json';
-/**
- * Examine the value of "crossOriginPort" as passed in from the url from
- * [window.location] to determine what the cross-origin port is for
- * this test.
- */
- // TODO(efortuna): If we need to use this function frequently, make a
- // url_analyzer library that is part of test.dart that these tests can import.
-int get crossOriginPort {
- var searchUrl = window.location.search;
- var crossOriginStr = 'crossOriginPort=';
- var index = searchUrl.indexOf(crossOriginStr);
- var nextArg = searchUrl.indexOf('&', index);
- return int.parse(searchUrl.substring(index + crossOriginStr.length,
- nextArg == -1 ? searchUrl.length : nextArg));
-}
-
main() {
useHtmlConfiguration();
- var port = crossOriginPort;
-
test('XHR Cross-domain', () {
- var url = "http://localhost:$port/tests/html/xhr_cross_origin_data.txt";
+ var url = "http://localhost:9876/tests/html/xhr_cross_origin_data.txt";
var xhr = new HttpRequest();
xhr.open('GET', url, true);
var validate = expectAsync1((data) {
@@ -49,7 +31,7 @@ main() {
});
test('XHR.get Cross-domain', () {
- var url = "http://localhost:$port/tests/html/xhr_cross_origin_data.txt";
+ var url = "http://localhost:9876/tests/html/xhr_cross_origin_data.txt";
new HttpRequest.get(url, expectAsync1((xhr) {
var data = JSON.parse(xhr.response);
expect(data, contains('feed'));
@@ -57,14 +39,4 @@ 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);
- }));
- });
}
« no previous file with comments | « tests/html/html.status ('k') | tests/html/xhr_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698