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

Unified Diff: tests/html/xhr_test.dart

Issue 10831314: Don't auto-send credentials on XHR.get (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test status for dart2js Created 8 years, 4 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
Index: tests/html/xhr_test.dart
diff --git a/tests/html/xhr_test.dart b/tests/html/xhr_test.dart
index b971f9d1e74e4b193a7dcdc451fe3eed950fc2f9..ec5a7339320b680b5c8bb2dba16af3c542a1101d 100644
--- a/tests/html/xhr_test.dart
+++ b/tests/html/xhr_test.dart
@@ -6,28 +6,28 @@
#import('../../lib/unittest/unittest.dart');
#import('../../lib/unittest/html_config.dart');
#import('dart:html');
+#import('dart:json');
main() {
useHtmlConfiguration();
- print(window.location.href);
- test('XHR', () {
+ test('XHR No file', () {
XMLHttpRequest xhr = new XMLHttpRequest();
xhr.open("GET", "NonExistingFile", true);
xhr.on.readyStateChange.add(expectAsync1((event) {
- if (xhr.readyState == 4) {
- Expect.equals(0, xhr.status);
- Expect.stringEquals('', xhr.responseText);
- }
- }));
+ if (xhr.readyState == XMLHttpRequest.DONE) {
+ expect(xhr.status, equals(0));
+ expect(xhr.responseText, equals(''));
+ }
+ }));
xhr.send();
});
- test('XHR.get', () {
- new XMLHttpRequest.get("NonExistingFile", expectAsync1((xhr) {
- Expect.equals(XMLHttpRequest.DONE, xhr.readyState);
- Expect.equals(0, xhr.status);
- Expect.stringEquals('', xhr.responseText);
- }));
+ test('XHR.get No file', () {
+ new XMLHttpRequest.get("NonExistingFile", expectAsync1((xhr) {
+ expect(xhr.readyState, equals(XMLHttpRequest.DONE));
+ expect(xhr.status, equals(0));
+ expect(xhr.responseText, equals(''));
+ }));
});
}
« tests/html/xhr_cross_origin_test.dart ('K') | « tests/html/xhr_cross_origin_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698