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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/frame-for-getregistrations.html

Issue 1168393002: Service Worker: Add ServiceWorkerContainer.getRegistrations() method. (Blink layout tests) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove iframe at the end of the test. Created 5 years, 6 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 | « LayoutTests/http/tests/serviceworker/getregistrations.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/resources/frame-for-getregistrations.html
diff --git a/LayoutTests/http/tests/serviceworker/resources/frame-for-getregistrations.html b/LayoutTests/http/tests/serviceworker/resources/frame-for-getregistrations.html
new file mode 100644
index 0000000000000000000000000000000000000000..511bd972090cc01e0bed798a2b2e6ac65b37ebc2
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/resources/frame-for-getregistrations.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<title>Service Worker: frame for getRegistrations()</title>
+<script>
+var scope = 'scope-for-getregistrations';
+var script = 'empty-worker.js';
+var registration;
+
+navigator.serviceWorker.register(script, { scope: scope })
+ .then(function(r) { registration = r; });
+
+self.onmessage = function(e) {
+ if (e.data == 'unregister') {
+ registration.unregister()
+ .then(function() {
+ e.ports[0].postMessage('unregistered');
+ });
+ }
+};
+</script>
« no previous file with comments | « LayoutTests/http/tests/serviceworker/getregistrations.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698