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

Unified Diff: tools/dom/src/_HttpRequestUtils.dart

Issue 11810004: Make browser tests all run from a server instead of the local filesystem. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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: tools/dom/src/_HttpRequestUtils.dart
diff --git a/tools/dom/src/_HttpRequestUtils.dart b/tools/dom/src/_HttpRequestUtils.dart
index 36a46ec94ea7424a7bff24dcacf0285a22daa328..7ebd01f56ae4a8e3e682bf0762b23a84a3889684 100644
--- a/tools/dom/src/_HttpRequestUtils.dart
+++ b/tools/dom/src/_HttpRequestUtils.dart
@@ -8,18 +8,16 @@ class _HttpRequestUtils {
// Helper for factory HttpRequest.get
static HttpRequest get(String url,
- onSuccess(HttpRequest request),
+ onComplete(HttpRequest request),
bool withCredentials) {
final request = new HttpRequest();
request.open('GET', url, true);
request.withCredentials = withCredentials;
- // Status 0 is for local XHR request.
request.on.readyStateChange.add((e) {
- if (request.readyState == HttpRequest.DONE &&
- (request.status == 200 || request.status == 0)) {
- onSuccess(request);
+ if (request.readyState == HttpRequest.DONE) {
+ onComplete(request);
}
});
« no previous file with comments | « tests/html/xhr_test.dart ('k') | tools/test.dart » ('j') | tools/testing/dart/http_server.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698