diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-15 19:31:27 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-15 19:31:27 +0000 |
commit | 59f7d173f32295f6fd0bd4e2c99340632f68e2c9 (patch) | |
tree | f9b5488ec0773b8a3c7626f860f24bfe167acac9 /content/test | |
parent | c8bb080c880d3e57ff15b0725341f8fcc3e30375 (diff) | |
download | chromium_src-59f7d173f32295f6fd0bd4e2c99340632f68e2c9.zip chromium_src-59f7d173f32295f6fd0bd4e2c99340632f68e2c9.tar.gz chromium_src-59f7d173f32295f6fd0bd4e2c99340632f68e2c9.tar.bz2 |
Add basic browser test for EmbeddedWorker/ServiceWorker
This test does:
- kick registerServiceWorker (primarily for installing ServiceWorkerProviderHost)
- manually associate ServiceWorkerProviderHost to an EmbeddedWorker (eventually this should be done via ServiceWorkerVersion)
- Start and stop the EmbeddedWorker, and observe OnStarted/OnStopped msgs are sent from the child process
BUG=313530, 285976
TEST=ServiceWorkerBrowserTest.EmbeddedWorkerBasic
Review URL: https://codereview.chromium.org/127573002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test')
-rw-r--r-- | content/test/data/service_worker/index.html | 11 | ||||
-rw-r--r-- | content/test/data/service_worker/worker.js | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/content/test/data/service_worker/index.html b/content/test/data/service_worker/index.html new file mode 100644 index 0000000..047c405 --- /dev/null +++ b/content/test/data/service_worker/index.html @@ -0,0 +1,11 @@ +<html> + <head> + <title>ServiceWorker test</title> + </head> + <script> + if (navigator.registerServiceWorker) { + navigator.registerServiceWorker('/*', 'worker.js'); + } + </script> +</html> + diff --git a/content/test/data/service_worker/worker.js b/content/test/data/service_worker/worker.js new file mode 100644 index 0000000..b6b90d4 --- /dev/null +++ b/content/test/data/service_worker/worker.js @@ -0,0 +1,6 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Has no content yet, this just needs to exist for script loading. +this.oninstalled = function(event) {}; |