Closed Bug 1491602 Opened Last year Closed Last year
[wpt-sync] Sync PR 13018 - Test new Speech
Sync web-platform-tests PR 13018 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/13018 Details from upstream follow. Philip Jägenstedt <firstname.lastname@example.org> wrote: > Test new SpeechSynthesisUtterance(null/undefined) > > Spec: https://w3c.github.io/speech-api/#tts-section > > This is targeting a mundane difference in `new > SpeechSynthesisUtterance(undefined)` depending on whether the IDL definition of > the construtor uses a single constructor with an optional argument, or two > constructor overloads with zero and one argument respectively. > > This is not equivalent because > https://heycam.github.io/webidl/#dfn-overload-resolution-algorithm first > considers the number of arguments, so given one argument the > `Constructor(DOMString text)` overload is used. With optional arguments, > however, trailing undefined arguments are ignored so that `foo(undefined)` will > be indistinguishable from `foo()`. > > In other words, `new SpeechSynthesisUtterance(undefined)` should result in a > `text` of "undefined" because the spec uses two contructor overloads, but > Blink/WebKit have a single constructor. Edge and Firefox pass the added test, so > align with them rather than changing the spec. (It doesn't really matter.)
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=e2cc1f4c5e32cd9ec56f08e0114cc41995da3f69
Ran 1 tests and 10 subtests OK : 1 PASS : 9 FAIL : 1 New tests that have failures or other problems: /speech-api/SpeechSynthesisUtterance-basics.https.html new SpeechSynthesisUtterance(undefined): FAIL
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/89a485a70c00 [wpt PR 13018] - Test new SpeechSynthesisUtterance(null/undefined), a=testonly https://hg.mozilla.org/integration/mozilla-inbound/rev/1a703d10ac50 [wpt PR 13018] - Update wpt metadata, a=testonly
You need to log in before you can comment on or make changes to this bug.