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

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..ba1d8acddd5a9f64898389d1ea286d6425746baf 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -811,11 +811,17 @@ function finishJSTest()
testRunner.notifyDone();
}
-function startWorker(testScriptURL, shared)
+function startWorker(testScriptURL, workerType)
{
self.jsTestIsAsync = true;
debug('Starting worker: ' + testScriptURL);
- var worker = shared ? new SharedWorker(testScriptURL, "Shared Worker") : new Worker(testScriptURL);
+ var worker;
+ if (workerType == 'shared')
+ worker = new SharedWorker(testScriptURL, "Shared Worker");
+ else if (workerType == 'compositor')
+ worker = new CompositorWorker(testScriptURL);
+ else
+ worker = new Worker(testScriptURL);
worker.onmessage = function(event)
{
var workerPrefix = "[Worker] ";
@@ -843,7 +849,7 @@ function startWorker(testScriptURL, shared)
finishJSTest();
};
- if (shared) {
+ if (workerType == 'shared') {
worker.port.onmessage = function(event) { worker.onmessage(event); };
worker.port.start();
}

Powered by Google App Engine
This is Rietveld 408576698