Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: content/test/data/service_worker/imports_bust_memcache.html

Issue 434453005: test for https://codereview.chromium.org/419693002/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script>
3 // See ServiceWorkerBrowserTest ImportsBustMemcache.
4 // Content-shell data persists, so unreg first to clear old data.
dominicc (has gone to gerrit) 2014/08/04 01:27:10 Content-shell -> Content Shell unreg - avoid abbre
5 // Register, unregister, then reregister, the browsertest .cc code examines
dominicc (has gone to gerrit) 2014/08/04 01:27:10 then/the seems odd
6 // the state of the scriptcache to ensure the script and import are cached.
7
8 var scope = 'imports_bust_memcache_scope/*';
9 var script = 'worker_with_one_import.js';
10
11 navigator.serviceWorker.unregister(scope)
12 .then(function(value) {
13 console.log('initial unregistration done');
14 return navigator.serviceWorker.register(script, {scope: scope});
15 })
16 .then(function(worker) {
17 console.log('initial registration done');
18 return navigator.serviceWorker.unregister(scope);
19 })
20 .then(function(value) {
21 console.log('unregistration done');
22 return navigator.serviceWorker.register(script, {scope: scope});
23 })
24 .then(function(worker) {
dominicc (has gone to gerrit) 2014/08/04 01:27:10 This will become a registration object. Since it i
25 console.log('second registration done');
26 document.title = 'OK'; // Titlewatcher looks for this.
27 })
28 .catch(function(e) {
29 console.log('error will robinson!');
dominicc (has gone to gerrit) 2014/08/04 01:27:10 I think Will Robinson was warned of danger, not er
michaeln 2014/08/08 02:32:37 levity removed
30 document.title = 'FAILED';
31 });
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698