Chromium Code Reviews| 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> |