summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/workers
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/data/workers')
-rw-r--r--chrome/test/data/workers/shared_worker_auth.html18
-rw-r--r--chrome/test/data/workers/worker_auth.html18
-rw-r--r--chrome/test/data/workers/worker_common.js2
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)));