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

Side by Side Diff: chrome/test/data/workers/worker_utils.js

Issue 9802025: Rewrite HTML5 workers ui_tests to browser_tests. Compared to ui_tests, browser_tests are faster, le… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to revision with blank line at end of worker-utils.js to see if this patches on bots Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 var shared_worker_count = 0; 1 var shared_worker_count = 0;
2 function getWorker(worker_url) 2 function getWorker(worker_url)
3 { 3 {
4 // Create either a dedicated or shared worker, depending on flags 4 // Create either a dedicated or shared worker, depending on flags
5 var url = document.location.toString(); 5 var url = document.location.toString();
6 if (url.search("shared") >= 0) { 6 if (url.search("shared") >= 0) {
7 // Make a shared worker that looks like a worker 7 // Make a shared worker that looks like a worker
8 var worker = new SharedWorker(worker_url, "name" + ++shared_worker_count); 8 var worker = new SharedWorker(worker_url, "name" + ++shared_worker_count);
9 worker.port.onmessage = function(evt) { 9 worker.port.onmessage = function(evt) {
10 worker.onmessage(evt); 10 worker.onmessage(evt);
(...skipping 15 matching lines...) Expand all
26 function onFailure() { 26 function onFailure() {
27 setTimeout(onFinished, 0, "FAIL"); 27 setTimeout(onFinished, 0, "FAIL");
28 } 28 }
29 29
30 function onFinished(result) { 30 function onFinished(result) {
31 var statusPanel = document.getElementById("statusPanel"); 31 var statusPanel = document.getElementById("statusPanel");
32 if (statusPanel) { 32 if (statusPanel) {
33 statusPanel.innerHTML = result; 33 statusPanel.innerHTML = result;
34 } 34 }
35 35
36 var cookie = "status=" + result + "; path=/"; 36 document.title = result;
37 document.cookie = cookie;
38 } 37 }
OLDNEW
« no previous file with comments | « chrome/test/data/workers/worker_close.html ('k') | content/browser/in_process_webkit/indexed_db_layout_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698