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

Unified Diff: chrome/test/data/workers/worker_common.js

Issue 10821016: Delete chrome/test/data/workers since it's not used anymore. It was copied in r148205 in preparatio… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/test/data/workers/worker_close.html ('k') | chrome/test/data/workers/worker_utils.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/workers/worker_common.js
===================================================================
--- chrome/test/data/workers/worker_common.js (revision 148361)
+++ chrome/test/data/workers/worker_common.js (working copy)
@@ -1,33 +0,0 @@
-// Track the number of clients for this worker - tests can use this to ensure
-// that shared workers are actually shared, not distinct.
-var num_clients = 0;
-
-if (!self.postMessage) {
- // This is a shared worker - mimic dedicated worker APIs
- onconnect = function(event) {
- num_clients++;
- event.ports[0].onmessage = function(e) {
- self.postMessage = function(msg) {
- event.ports[0].postMessage(msg);
- };
- self.onmessage(e);
- };
- };
-} else {
- num_clients++;
-}
-onmessage = function(evt) {
- if (evt.data == "ping")
- postMessage("pong");
- else if (evt.data == "auth")
- importScripts("/auth-basic");
- else if (evt.data == "close")
- close();
- else if (/eval.+/.test(evt.data)) {
- try {
- postMessage(eval(evt.data.substr(5)));
- } catch (ex) {
- postMessage(ex);
- }
- }
-}
« no previous file with comments | « chrome/test/data/workers/worker_close.html ('k') | chrome/test/data/workers/worker_utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698