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

Unified Diff: tests/html/xhr_cross_origin_test.dart

Issue 11641005: Add cross-origin test with credentials. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « no previous file | tests/html/xhr_test.dart » ('j') | tools/test.dart » ('J')
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 d39af2c85e388bcfdb6e6e60f0f352ff50b9f429..ade368e507b49f5405c82b885cff96ba90be12cc 100644
--- a/tests/html/xhr_cross_origin_test.dart
+++ b/tests/html/xhr_cross_origin_test.dart
@@ -12,7 +12,7 @@ main() {
useHtmlConfiguration();
test('XHR Cross-domain', () {
- var url = "http://localhost:9876/tests/html/xhr_cross_origin_data.txt";
+ var url = "http://localhost:5432/tests/html/xhr_cross_origin_data.txt";
Mads Ager (google) 2013/01/02 10:09:50 It would be cool to avoid the hard-coded port numb
Emily Fortuna 2013/01/04 00:51:03 Done.
var xhr = new HttpRequest();
xhr.open('GET', url, true);
var validate = expectAsync1((data) {
@@ -31,7 +31,7 @@ main() {
});
test('XHR.get Cross-domain', () {
- var url = "http://localhost:9876/tests/html/xhr_cross_origin_data.txt";
+ var url = "http://localhost:5432/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 +39,14 @@ main() {
expect(data, isMap);
}));
});
+
+ test('XHR.getWithCredentials Cross-domain', () {
+ var url = "http://localhost:5432/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 | « no previous file | tests/html/xhr_test.dart » ('j') | tools/test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698