DescriptionUpstream service worker `postMessage` tests to WPT
**postmessage-msgport-to-client**
This test exists in both WPT and the Chromium project tree. Although the
two implementations assert the same behavior, the Chromium version is
preferable for a number of reasons:
- It uses the `promise_test` function and expresses the test body in
terms of promises, resulting in improved test readability.
- It extends the "message" event lifetime via
`ExtendableEvent#waitUntil`, discouraging unexpected worker
termination.
Update the upstream version of the test with these improvements. In
addition, remove the dynamically-generated iframe at the test's
conclusion. Remove the Chromium-specific version of the test.
**postmessage-to-client**
This test exists in both WPT and the Chromium project tree. Although the
two implementations assert the same behavior, the Chromium version is
preferable for a number of reasons:
- It uses the `promise_test` function and expresses the test body in
terms of promises, resulting in improved test readability.
- It extends the "message" event lifetime via
`ExtendableEvent#waitUntil`, discouraging unexpected worker
termination.
Retain the additional assertions present in the upstream version (i.e.
those for the `bubbles` and `cancelable` attributes of the event
object). Update the upstream version of the test with these
improvements. In addition, remove the dynamically-generated iframe at
the test's conclusion. Remove the Chromium-specific version of the test.
**postmessage**
This test exists in both WPT and the Chromium project tree. Although the
two implementations assert the same behavior, the Chromium version is
preferable for a number of reasons:
- It includes additional tests concerning the transference of
ArrayBuffer instances between clients and worker
- It uses the `promise_test` function and expresses the test body in
terms of promises, resulting in improved test readability.
Update the upstream version of the test with these improvements. Remove
the Chromium-specific version of the test.
BUG=688116
R=falken@chromium.org
Review-Url: https://codereview.chromium.org/2875383002
Cr-Commit-Position: refs/heads/master@{#471940}
Committed: https://chromium.googlesource.com/chromium/src/+/f4c4a4de426ccab70896c80c48e58b770420c008
Patch Set 1 #
Total comments: 10
Patch Set 2 : Incorporate review feedback #Messages
Total messages: 11 (5 generated)
|