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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworker-message-event-historical.html

Issue 2466513002: Deprecate ServiceWorkerMessageEvent in favor of MessageEvent (Closed)
Patch Set: Remove ServiceWorkerMessageEvent codes; update layout tests Created 4 years, 1 month 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
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworker-message-event-historical.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworker-message-event.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworker-message-event-historical.html
similarity index 71%
rename from third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworker-message-event.html
rename to third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworker-message-event-historical.html
index 66e29612727a9d801729fdc64914c691769b681e..abeb80a138993fbb6c4cb8c88103c7d607aacad5 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworker-message-event.html
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworker-message-event-historical.html
@@ -18,26 +18,27 @@ promise_test(function(t) {
.then(function(frame) {
var w = frame.contentWindow;
var worker = w.navigator.serviceWorker.controller;
- // Test constructor with ServiceWorker object as source.
- var e = new ServiceWorkerMessageEvent('eventType', {source: worker});
- assert_equals(e.source, worker,
- 'Source should equal to the passing service worker');
+ assert_equals(
+ self.ServiceWorkerMessageEvent, undefined,
+ 'ServiceWorkerMessageEvent should not be defined.');
return new Promise(function(resolve) {
w.navigator.serviceWorker.onmessage = t.step_func(function(e) {
- assert_true(e instanceof w.ServiceWorkerMessageEvent);
+ assert_true(
+ e instanceof w.MessageEvent,
+ 'message events should use MessageEvent interface.');
assert_true(e.source instanceof w.ServiceWorker);
assert_equals(e.type, 'message');
assert_equals(e.source, worker,
- 'Source worker should equal to the controller');
+ 'source should equal to the controller.');
assert_equals(e.ports.length, 0);
resolve();
nhiroki 2016/11/14 05:48:55 Can we merge this test into postmessage-to-client.
jungkees 2016/11/14 14:17:11 I merged the relevant asserts into postmessage-to-
- });
+ });
worker.postMessage('PING');
- });
+ });
})
.then(function() {
return service_worker_unregister_and_done(t, scope);
});
- }, 'Test ServiceWorkerMessageEvent type.');
+ }, 'Test MessageEvent supplants ServiceWorkerMessageEvent.');
</script>

Powered by Google App Engine
This is Rietveld 408576698