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

Unified Diff: LayoutTests/resources/js-test.js

Issue 1101583003: compositor-worker: Restrict the global interface in CompositorWorker. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 8 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: LayoutTests/resources/js-test.js
diff --git a/LayoutTests/resources/js-test.js b/LayoutTests/resources/js-test.js
index e86533fc2bd1befb5085f7abbadbcc0118352dc5..156ba5ec1e4b75fbf81bef658a944925ef95cdd6 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -811,11 +811,13 @@ function finishJSTest()
testRunner.notifyDone();
}
-function startWorker(testScriptURL, shared)
+function startWorker(testScriptURL, workerType)
{
+ var shared = (workerType == 'shared' || (typeof workerType == 'boolean' && workerType));
haraken 2015/04/22 11:07:28 What is the 'typeof workerType == 'boolean' && wor
kinuko 2015/04/22 14:18:07 Can we just update all startWorker() for shared wo
sadrul 2015/04/22 22:17:19 Done! (there was certainly way less than I feared)
+ var compositor = workerType == 'compositor';
self.jsTestIsAsync = true;
debug('Starting worker: ' + testScriptURL);
- var worker = shared ? new SharedWorker(testScriptURL, "Shared Worker") : new Worker(testScriptURL);
+ var worker = shared ? new SharedWorker(testScriptURL, "Shared Worker") : compositor ? new CompositorWorker(testScriptURL) : new Worker(testScriptURL);
haraken 2015/04/22 11:07:28 Can we clean up the code a bit more? if (...) w
sadrul 2015/04/22 22:17:19 Done.
worker.onmessage = function(event)
{
var workerPrefix = "[Worker] ";

Powered by Google App Engine
This is Rietveld 408576698