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

Unified Diff: LayoutTests/storage/resources/database-worker-controller.js

Issue 598034: Refactor a database test such that its code can be shared between the documen... (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/
Patch Set: '' Created 10 years, 10 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
« no previous file with comments | « LayoutTests/storage/resources/database-worker.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/storage/resources/database-worker-controller.js
===================================================================
--- LayoutTests/storage/resources/database-worker-controller.js (revision 0)
+++ LayoutTests/storage/resources/database-worker-controller.js (revision 0)
@@ -0,0 +1,18 @@
+var databaseWorker = new Worker('resources/database-worker.js');
+
+databaseWorker.onmessage = function(event) {
+ if (event.data.indexOf('log:') == 0) {
+ log(event.data.substring(4));
+ } else if (event.data == 'notifyDone') {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ } else {
+ throw new Error("Unrecognized message: " + event);
+ }
+}
+
+function log(message)
+{
+ document.getElementById("console").innerText += message + "\n";
+}
+
« no previous file with comments | « LayoutTests/storage/resources/database-worker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698