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

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

Issue 580007: Changed CreateWorker to coalesce any matching queued shared workers when a (Closed)
Patch Set: Now supports multiple queued instances of one shared worker. 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 <html>
2 <body>
3 <div id=result></div>
4 <script>
5 function log(message)
6 {
7 document.getElementById("result").innerHTML += message + "<br>";
8 }
9
10 var url = document.location.toString();
11 var num_workers = parseInt(url.substr(url.search("count=") + 6));
12
13 if (!num_workers) {
14 log("No count= parameter provided - test aborted");
15 }
16
17 for (var i = 0; i < num_workers ; ++i) {
18 createWorker(i);
19 }
20
21 var workers_created = 0;
22 function createWorker(i) {
23 var worker = new SharedWorker("worker_common.js?id=" + i);
24 worker.port.postMessage("eval num_clients");
25 worker.port.onmessage = function(event) {
26 workers_created++;
27 log("worker " + i + " started - num_clients = " + event.data);
28 if (workers_created == num_workers) {
29 // created the last worker
30 log("SUCCESS: all workers created");
31 document.cookie = "status=OK";
32 }
33 }
34 }
35 </script>
36
37 </body>
38 </html>
OLDNEW
« no previous file with comments | « chrome/browser/worker_host/worker_service.cc ('k') | chrome/test/data/workers/queued_shared_worker_shutdown.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698