diff options
author | dimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 23:40:08 +0000 |
---|---|---|
committer | dimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 23:40:08 +0000 |
commit | a843a3fde6e142db763e90030cbbeac0ebe0dac1 (patch) | |
tree | 7a3454ea3b4fe2532ec97759ce0cbf7939e4b638 /chrome/test/data/workers | |
parent | 2196f3055c77317fddabdcd0c263d037ab6e0699 (diff) | |
download | chromium_src-a843a3fde6e142db763e90030cbbeac0ebe0dac1.zip chromium_src-a843a3fde6e142db763e90030cbbeac0ebe0dac1.tar.gz chromium_src-a843a3fde6e142db763e90030cbbeac0ebe0dac1.tar.bz2 |
Add ability to start/stop http server to ui_tests. This will be used to run Workers+XHR layout tests which is impossible to run in test_shell.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/125283
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19082 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/workers')
-rw-r--r-- | chrome/test/data/workers/test_http_server_up.html | 28 | ||||
-rw-r--r-- | chrome/test/data/workers/worker_common.php | 4 |
2 files changed, 32 insertions, 0 deletions
diff --git a/chrome/test/data/workers/test_http_server_up.html b/chrome/test/data/workers/test_http_server_up.html new file mode 100644 index 0000000..767827e --- /dev/null +++ b/chrome/test/data/workers/test_http_server_up.html @@ -0,0 +1,28 @@ +<html> +<head> +<title>Test Http Server is up.</title> + +<script src="worker_utils.js"></script> + +<script> + +// Load the worker from the php script. +// If this page loads and can access php, the server +// is resonably up and running. + +var worker = new Worker("worker_common.php"); + +worker.onmessage = function(evt) { + if (evt.data == "pong") + onSuccess(); +} + +worker.postMessage("ping"); + +</script> +</head> + +<body> +<div id=statusPanel></div> +</body> +</html> diff --git a/chrome/test/data/workers/worker_common.php b/chrome/test/data/workers/worker_common.php new file mode 100644 index 0000000..f601edd --- /dev/null +++ b/chrome/test/data/workers/worker_common.php @@ -0,0 +1,4 @@ +<?php
+echo "onmessage = function(evt) { if (evt.data == 'ping') postMessage('pong'); }";
+?>
+
|