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

Side by Side Diff: LayoutTests/storage/resources/database-worker.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 unified diff | Download patch
OLDNEW
(Empty)
1 var window = {
2 layoutTestController: {
3 notifyDone: function() { postMessage("notifyDone"); }
4 }
5 };
6 var layoutTestController = window.layoutTestController;
7
8 function log(s) {
9 postMessage("log:" + s);
10 }
11
12 onmessage = function(event) {
13 try {
14 if (event.data.indexOf("importScripts:") == 0) {
15 var scripts = event.data.substring("importScripts:".length).split(",");
16 for (var i in scripts) {
17 scripts[i] = "../" + scripts[i];
18 }
19 importScripts(scripts);
20 } else if (event.data == "runTest") {
21 runTest(); // Must be defined by some imported script.
22 } else {
23 log("Received unexpected message: " + event.data);
24 }
25 } catch (ex) {
26 log("Worker caught exception: " + ex);
27 window.layoutTestController.notifyDone();
28 }
29 }
OLDNEW
« no previous file with comments | « LayoutTests/storage/execute-sql-args-worker-expected.txt ('k') | LayoutTests/storage/resources/database-worker-controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698