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

Side by Side Diff: chrome/test/data/workers/queued_shared_worker_shutdown.html

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, 8 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 <html> 1 <html>
2 <head>
3 <script src="worker_utils.js"></script>
4 </head>
2 <body> 5 <body>
3 <div id=result></div> 6 <div id=result></div>
4 <script> 7 <script>
5 function log(message) 8 function log(message)
6 { 9 {
7 document.getElementById("result").innerHTML += message + "<br>"; 10 document.getElementById("result").innerHTML += message + "<br>";
8 } 11 }
9 12
10 var url = document.location.toString(); 13 var url = document.location.toString();
11 var num_workers = parseInt(url.substr(url.search("count=") + 6)); 14 var num_workers = parseInt(url.substr(url.search("count=") + 6));
(...skipping 19 matching lines...) Expand all
31 workers_created++; 34 workers_created++;
32 log("worker " + i + " started"); 35 log("worker " + i + " started");
33 if (workers_created == num_workers) { 36 if (workers_created == num_workers) {
34 // We've created all of our workers. Let's shut down the most recent one 37 // We've created all of our workers. Let's shut down the most recent one
35 // and see if we startup the queued worker. 38 // and see if we startup the queued worker.
36 log("Shutting down worker " + i); 39 log("Shutting down worker " + i);
37 worker.port.postMessage("close"); 40 worker.port.postMessage("close");
38 } else if (workers_created == (num_workers+2)) { 41 } else if (workers_created == (num_workers+2)) {
39 // created the last worker 42 // created the last worker
40 log("SUCCESS: queued worker created"); 43 log("SUCCESS: queued worker created");
41 document.cookie = "status=OK"; 44 onSuccess();
42 } 45 }
43 } 46 }
44 } 47 }
45 </script> 48 </script>
46 49
47 </body> 50 </body>
48 </html> 51 </html>
OLDNEW
« no previous file with comments | « chrome/test/data/workers/many_shared_workers.html ('k') | chrome/test/data/workers/terminate_queued_workers.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698