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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/workers/many_shared_workers.html
diff --git a/chrome/test/data/workers/many_shared_workers.html b/chrome/test/data/workers/many_shared_workers.html
new file mode 100644
index 0000000000000000000000000000000000000000..2958e8502386399d5721a115d46b4da8f43a6ba4
--- /dev/null
+++ b/chrome/test/data/workers/many_shared_workers.html
@@ -0,0 +1,38 @@
+<html>
+<body>
+<div id=result></div>
+<script>
+function log(message)
+{
+ document.getElementById("result").innerHTML += message + "<br>";
+}
+
+var url = document.location.toString();
+var num_workers = parseInt(url.substr(url.search("count=") + 6));
+
+if (!num_workers) {
+ log("No count= parameter provided - test aborted");
+}
+
+for (var i = 0; i < num_workers ; ++i) {
+ createWorker(i);
+}
+
+var workers_created = 0;
+function createWorker(i) {
+ var worker = new SharedWorker("worker_common.js?id=" + i);
+ worker.port.postMessage("eval num_clients");
+ worker.port.onmessage = function(event) {
+ workers_created++;
+ log("worker " + i + " started - num_clients = " + event.data);
+ if (workers_created == num_workers) {
+ // created the last worker
+ log("SUCCESS: all workers created");
+ document.cookie = "status=OK";
+ }
+ }
+}
+</script>
+
+</body>
+</html>
« 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