Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / test / data / service_worker / imports_bust_memcache.html
blobcc0db4f494046130898a3c2aac557ca2494fb94f
1 <!DOCTYPE html>
2 <script>
3 // See ServiceWorkerBrowserTest ImportsBustMemcache.
4 // Content-Shell data persists so unregister first to clear old data.
5 // Register, unregister, then reregister. The browsertest examines the
6 // state of the scriptcache to ensure the script and import are cached.
8 var scope = 'imports_bust_memcache_scope/';
9 var script = 'worker_with_one_import.js';
11 navigator.serviceWorker.unregister(scope)
12 .then(function(_) {
13 console.log('initial unregistration done');
14 return navigator.serviceWorker.register(script, {scope: scope});
16 .then(function(_) {
17 console.log('initial registration done');
18 return navigator.serviceWorker.unregister(scope);
20 .then(function(_) {
21 console.log('unregistration done');
22 return navigator.serviceWorker.register(script, {scope: scope});
24 .then(function(_) {
25 console.log('second registration done');
26 document.title = 'OK'; // Titlewatcher looks for this.
28 .catch(function(e) {
29 document.title = 'FAILED';
30 });
31 </script>