diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 20:34:25 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 20:34:25 +0000 |
commit | 100a0095898381f0efb3d441a7f533ed96923042 (patch) | |
tree | e9dd922e4e4a20f2dca067e794e5b489b9bf2d2d /chrome/test | |
parent | 6d2721fbdbddd4d35616d9b7774945a3cf42375b (diff) | |
download | chromium_src-100a0095898381f0efb3d441a7f533ed96923042.zip chromium_src-100a0095898381f0efb3d441a7f533ed96923042.tar.gz chromium_src-100a0095898381f0efb3d441a7f533ed96923042.tar.bz2 |
Refactored code to allow associating workers with multiple renderers.
SharedWorkers now gracefully handle http auth requests after their
initial window has closed.
BUG=27660
TEST=WorkerHttpAuth,SharedWorkerHttpAuth uitests
Review URL: http://codereview.chromium.org/509016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/data/workers/shared_worker_auth.html | 18 | ||||
-rw-r--r-- | chrome/test/data/workers/worker_auth.html | 18 | ||||
-rw-r--r-- | chrome/test/data/workers/worker_common.js | 2 |
3 files changed, 38 insertions, 0 deletions
diff --git a/chrome/test/data/workers/shared_worker_auth.html b/chrome/test/data/workers/shared_worker_auth.html new file mode 100644 index 0000000..fbe4ad2 --- /dev/null +++ b/chrome/test/data/workers/shared_worker_auth.html @@ -0,0 +1,18 @@ +<html> + +<head> +<title>SharedWorker HTTP Auth Test</title> + +<script src="worker_utils.js"></script> + +<script> + +var worker = new SharedWorker("worker_common.js"); +worker.port.postMessage("auth"); +</script> +</head> + +<body> +<div id=statusPanel></div> +</body> +</html> diff --git a/chrome/test/data/workers/worker_auth.html b/chrome/test/data/workers/worker_auth.html new file mode 100644 index 0000000..e452155 --- /dev/null +++ b/chrome/test/data/workers/worker_auth.html @@ -0,0 +1,18 @@ +<html> + +<head> +<title>Worker HTTP Auth Test</title> + +<script src="worker_utils.js"></script> + +<script> + +var worker = getWorker("worker_common.js"); +worker.postMessage("auth"); +</script> +</head> + +<body> +<div id=statusPanel></div> +</body> +</html> diff --git a/chrome/test/data/workers/worker_common.js b/chrome/test/data/workers/worker_common.js index 8caa622..664da58 100644 --- a/chrome/test/data/workers/worker_common.js +++ b/chrome/test/data/workers/worker_common.js @@ -12,6 +12,8 @@ if (!self.postMessage) { onmessage = function(evt) { if (evt.data == "ping") postMessage("pong"); + else if (evt.data == "auth") + importScripts("/auth-basic"); else if (/eval.+/.test(evt.data)) { try { postMessage(eval(evt.data.substr(5))); |