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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/service_worker/service_worker_script_cache_map.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cc0db4f494046130898a3c2aac557ca2494fb94f
--- /dev/null
+++ b/content/test/data/service_worker/imports_bust_memcache.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script>
+// See ServiceWorkerBrowserTest ImportsBustMemcache.
+// Content-Shell data persists so unregister first to clear old data.
+// Register, unregister, then reregister. The browsertest examines the
+// state of the scriptcache to ensure the script and import are cached.
+
+var scope = 'imports_bust_memcache_scope/';
+var script = 'worker_with_one_import.js';
+
+navigator.serviceWorker.unregister(scope)
+.then(function(_) {
+ console.log('initial unregistration done');
+ return navigator.serviceWorker.register(script, {scope: scope});
+})
+.then(function(_) {
+ console.log('initial registration done');
+ return navigator.serviceWorker.unregister(scope);
+})
+.then(function(_) {
+ console.log('unregistration done');
+ return navigator.serviceWorker.register(script, {scope: scope});
+})
+.then(function(_) {
+ console.log('second registration done');
+ document.title = 'OK'; // Titlewatcher looks for this.
+})
+.catch(function(e) {
+ document.title = 'FAILED';
+});
+</script>
« no previous file with comments | « content/browser/service_worker/service_worker_script_cache_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698