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> |