Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/postmessage-to-client.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/postmessage-to-client.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/postmessage-to-client.html |
index fadc7d2a51cdea387b23bb4bfcd14449598a26e4..dc7aa3dd9df7b8561441880f922a217468b0fb75 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/postmessage-to-client.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/postmessage-to-client.html |
@@ -25,16 +25,21 @@ promise_test(t => { |
}) |
.then(e => { |
var message = e.data; |
- assert_equals(e.origin, location.origin, |
- 'origin of message should be origin of Service Worker'); |
+ assert_equals(e.constructor, w.MessageEvent, |
+ 'message events should use MessageEvent interface.'); |
+ assert_equals( |
+ e.origin, location.origin, |
+ 'origin of message should be origin of Service Worker.'); |
assert_equals(e.lastEventId, '', |
- 'lastEventId should be an empty string'); |
+ 'lastEventId should be an empty string.'); |
+ assert_equals(e.source, w.navigator.serviceWorker.controller, |
+ 'source should be ServiceWorker.'); |
nhiroki
2016/11/14 05:48:55
Can you check assert_equals(e.ports.length, 0); he
jungkees
2016/11/14 14:17:11
Done.
|
assert_equals(message, 'Sending message via clients'); |
return new Promise(resolve => { |
w.navigator.serviceWorker.onmessage = resolve; |
}); |
}) |
.then(e => { assert_equals(e.data, 'quit'); }); |
- }, 'postMessage from ServiceWorker to Client'); |
+ }, 'postMessage from ServiceWorker to Client.'); |
</script> |