UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/56.0.2924.76 Chrome/56.0.2924.76 Safari/537.36
Steps to reproduce the problem:
1. Execute the following code in the context of a service worker:
new ExtendableMessageEvent('name', { ports: null });
What is the expected behavior?
A TypeError should be thrown
What went wrong?
The expression results with a normal completion, the value of which is an instance of ExtendableMessageEvent whose `ports` property is `null`.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 58.0.3029.19 Channel: dev
OS Version:
Flash Version:
According to the WebIDL definition [1], the value is not nullable and must be
coercible to a sequence.
The project currently includes an invalid test that asserts the incorrect
behavior as "expected" [2]. I am currently working to migrate these tests to
the Web Platform Tests project (as per [3]); I am correcting this test and
blacklisting it in the process.
[1] https://w3c.github.io/ServiceWorker/#extendablemessageevent-interface
> # 4.8. ExtendableMessageEvent
>
> dictionary ExtendableMessageEventInit : ExtendableEventInit {
> any data = null;
> USVString origin = "";
> DOMString lastEventId = "";
> (Client or ServiceWorker or MessagePort)? source = null;
> sequence<MessagePort> ports = [];
> };
[2] https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/extendable-message-event-constructor-worker.js?sq&l=134
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=688116&desc=2
Comment 1 by m...@mikepennisi.com
, Mar 16 2017