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

Unified Diff: LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-event.js

Issue 71433002: Enable XHR upload progress events for Workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing doctype declaration 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-worker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-event.js
diff --git a/LayoutTests/http/tests/xmlhttprequest/workers/resources/file-not-found.js b/LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-event.js
similarity index 63%
copy from LayoutTests/http/tests/xmlhttprequest/workers/resources/file-not-found.js
copy to LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-event.js
index 47e163d7b807e88bc2ed398f7935afe6df6d6722..d070e0fedf53cec2eb949fb4e904db7ef42f1441 100644
--- a/LayoutTests/http/tests/xmlhttprequest/workers/resources/file-not-found.js
+++ b/LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-event.js
@@ -13,13 +13,16 @@ function log(message)
console_messages.appendChild(item);
}
-var worker = createWorker('resources/xmlhttprequest-file-not-found.js');
+var progress_ticks = 0;
+var worker = createWorker('resources/upload-onprogress-worker.js');
worker.onmessage = function(evt)
{
- if (/log .+/.test(evt.data))
+ if (/log .+/.test(evt.data)) {
log(evt.data.substr(4));
- else if (/DONE/.test(evt.data)) {
- log("PASS");
+ } else if (/tick .+/.test(evt.data)) {
+ progress_ticks++;
+ } else if (/DONE/.test(evt.data)) {
+ log(progress_ticks >= 1 ? "PASS" : "FAIL");
if (window.testRunner)
testRunner.notifyDone();
}
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698