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

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

Issue 1140133003: js-test.js: Allow creating a CompositorWorker. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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..f30940f8dfc2c0be7bbc8e98adcf900e34660b29 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -811,11 +811,19 @@ function finishJSTest()
testRunner.notifyDone();
}
-function startWorker(testScriptURL, shared)
+function startWorker(testScriptURL, workerType)
{
+ var shared = workerType == 'shared';
+ var compositor = workerType == 'compositor';
kinuko 2015/05/18 05:36:58 nit: not sure if having these locals help anything
sadrul 2015/05/18 18:07:10 Done.
self.jsTestIsAsync = true;
debug('Starting worker: ' + testScriptURL);
- var worker = shared ? new SharedWorker(testScriptURL, "Shared Worker") : new Worker(testScriptURL);
+ var worker;
+ if (shared)
+ worker = new SharedWorker(testScriptURL, "Shared Worker");
+ else if (compositor)
+ worker = new CompositorWorker(testScriptURL);
+ else
+ worker = new Worker(testScriptURL);
worker.onmessage = function(event)
{
var workerPrefix = "[Worker] ";

Powered by Google App Engine
This is Rietveld 408576698