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

Unified Diff: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html

Issue 66323004: XHR: compliant event sequencing on request errors and aborts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html
diff --git a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html
index 4ce6207e56cfde737da3060c8d161102327ea493..971c647f7b8b98266fbcab8630daa728172cf9d8 100644
--- a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html
+++ b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html
@@ -16,9 +16,12 @@ function log(msg)
}
function onProgress(e) {
- log("PASSED (" + count + ")");
- if (++count > 2 && window.testRunner)
- testRunner.notifyDone();
+ if (!this.seenProgress) {
+ this.seenProgress = true;
tyoshino (SeeGerritForStatus) 2013/11/19 16:57:38 how about early return? if (this.seenProgress)
sof 2013/11/19 18:57:03 Done.
+ log("PASSED (" + count + ")");
+ if (++count > 2 && window.testRunner)
+ testRunner.notifyDone();
+ }
}
if (window.testRunner) {
@@ -29,12 +32,14 @@ if (window.testRunner) {
// Test for capture phase
var req3 = new XMLHttpRequest();
req3.addEventListener("progress", onProgress, true);
+req3.seenProgress = false;
req3.open("GET", "resources/1251.html", true);
req3.send(null);
// Test for bubble phase
var req4 = new XMLHttpRequest();
req4.addEventListener("progress", onProgress, false);
+req4.seenProgress = false;
req4.open("GET", "resources/1251.html", true);
req4.send(null);

Powered by Google App Engine
This is Rietveld 408576698