diff options
author | yurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-17 06:32:34 +0000 |
---|---|---|
committer | yurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-17 06:32:34 +0000 |
commit | 867fd923c96a230da771fe52885c16b0d651a60e (patch) | |
tree | e837437bd055731cc53d74e6d1a76c48f4b46a65 /chrome/test/data/workers | |
parent | e84f98c463a1653bab24cec09712680b6dce8798 (diff) | |
download | chromium_src-867fd923c96a230da771fe52885c16b0d651a60e.zip chromium_src-867fd923c96a230da771fe52885c16b0d651a60e.tar.gz chromium_src-867fd923c96a230da771fe52885c16b0d651a60e.tar.bz2 |
DevTools: test that debugger can be paused in shared worker initialization code
Added a test that navigates to a page which launches a shared worker, opens devtools for the worker, terminates the worker and reloads the page to recreate the worker. After that the test checks that debugger is paused on the debugger statement(which is the first one) in the reloaded worker.
BUG=None
TEST=WorkerDevToolsSanityTest.PauseInSharedWorkerInitialization
Review URL: http://codereview.chromium.org/8208012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/workers')
-rw-r--r-- | chrome/test/data/workers/debug_shared_worker_initialization.html | 18 | ||||
-rw-r--r-- | chrome/test/data/workers/debug_shared_worker_initialization.js | 7 |
2 files changed, 25 insertions, 0 deletions
diff --git a/chrome/test/data/workers/debug_shared_worker_initialization.html b/chrome/test/data/workers/debug_shared_worker_initialization.html new file mode 100644 index 0000000..b084d62 --- /dev/null +++ b/chrome/test/data/workers/debug_shared_worker_initialization.html @@ -0,0 +1,18 @@ +<html> +<body> +<div id=result></div> +<script> +function log(message) +{ + document.getElementById("result").innerHTML += message + "<br>"; +} + +var worker = new SharedWorker("debug_shared_worker_initialization.js"); +worker.port.postMessage("ping"); +worker.port.onmessage = function(event) { + log("worker replied: " + event.data); +} +</script> + +</body> +</html> diff --git a/chrome/test/data/workers/debug_shared_worker_initialization.js b/chrome/test/data/workers/debug_shared_worker_initialization.js new file mode 100644 index 0000000..204afc8 --- /dev/null +++ b/chrome/test/data/workers/debug_shared_worker_initialization.js @@ -0,0 +1,7 @@ +debugger; +var globalVar = 2011; +onconnect = function(e) { + var port = e.ports[0]; + port.postMessage("pong"); +} + |