Chromium Code Reviews| Index: content/test/data/service_worker/imports_bust_memcache.html |
| diff --git a/content/test/data/service_worker/imports_bust_memcache.html b/content/test/data/service_worker/imports_bust_memcache.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..50ab02bccef1f56d80aa3861c48171a5cc3582e1 |
| --- /dev/null |
| +++ b/content/test/data/service_worker/imports_bust_memcache.html |
| @@ -0,0 +1,32 @@ |
| +<!DOCTYPE html> |
| +<script> |
| +// See ServiceWorkerBrowserTest ImportsBustMemcache. |
| +// Content-shell data persists, so unreg first to clear old data. |
| +// Register, unregister, then reregister, the browsertest .cc code examines |
| +// the state of the scriptcache to ensure the script and import are cached. |
|
michaeln
2014/08/08 19:46:03
ooops... my edits to this file didn't make it into
|
| + |
| +var scope = 'imports_bust_memcache_scope/*'; |
| +var script = 'worker_with_one_import.js'; |
| + |
| +navigator.serviceWorker.unregister(scope) |
| +.then(function(value) { |
| + console.log('initial unregistration done'); |
| + return navigator.serviceWorker.register(script, {scope: scope}); |
| +}) |
| +.then(function(worker) { |
| + console.log('initial registration done'); |
| + return navigator.serviceWorker.unregister(scope); |
| +}) |
| +.then(function(value) { |
| + console.log('unregistration done'); |
| + return navigator.serviceWorker.register(script, {scope: scope}); |
| +}) |
| +.then(function(worker) { |
| + console.log('second registration done'); |
| + document.title = 'OK'; // Titlewatcher looks for this. |
| +}) |
| +.catch(function(e) { |
| + console.log('error will robinson!'); |
| + document.title = 'FAILED'; |
| +}); |
| +</script> |