Index: LayoutTests/http/tests/serviceworker/resources/register.html |
diff --git a/LayoutTests/http/tests/serviceworker/resources/register.html b/LayoutTests/http/tests/serviceworker/resources/register.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..573aff45b6e36a935887713c06eaa02b81acec65 |
--- /dev/null |
+++ b/LayoutTests/http/tests/serviceworker/resources/register.html |
@@ -0,0 +1,19 @@ |
+<!doctype html> |
+<title>register</title> |
+<script src="test-helpers.js"></script> |
+<body> |
+<script> |
+navigator.serviceWorker.register('empty-worker.js', {scope: 'scope-register'}) |
+ .then( |
+ registration => { |
+ registration.unregister(); |
Kunihiko Sakamoto
2015/08/24 07:31:58
You might want to wait for completion as we run tw
falken
2015/08/24 07:41:07
Sounds good, added the then.
It's actually not ne
|
+ window.parent.postMessage('OK', '*'); |
+ }, |
+ error => { |
+ window.parent.postMessage('FAIL: ' + error.name, '*'); |
+ }) |
+ .catch(error => { |
+ window.parent.postMessage('ERROR: ' + error.name, '*'); |
+ }); |
+</script> |
+</body> |