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

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: Improve test code quality 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..981e0e03aa7238374b8aebfa8a3284aaf45ef770 100644
--- a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html
+++ b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html
@@ -1,3 +1,4 @@
+<!doctype html>
<html>
<head>
<title> Test case for bug 18655 </title>
@@ -16,6 +17,10 @@ function log(msg)
}
function onProgress(e) {
+ if (this.seenProgress)
+ return;
+
+ this.seenProgress = true;
log("PASSED (" + count + ")");
if (++count > 2 && window.testRunner)
testRunner.notifyDone();
@@ -29,12 +34,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