diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-28 01:28:49 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-28 01:28:49 +0000 |
commit | 0791d3a25978f15adfe3ddc073850f7ce2bd158e (patch) | |
tree | 857cf4f343edff2ea739571384246af4c7cbc4ae /chrome/test | |
parent | 26426a2af6a18a8e29bdf1eb09bee9f073304d1b (diff) | |
download | chromium_src-0791d3a25978f15adfe3ddc073850f7ce2bd158e.zip chromium_src-0791d3a25978f15adfe3ddc073850f7ce2bd158e.tar.gz chromium_src-0791d3a25978f15adfe3ddc073850f7ce2bd158e.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
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=36888
Reverted and reopened due to valgrind failures.
Review URL: http://codereview.chromium.org/509016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37365 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))); |