Closed Bug 1491602 Opened Last year Closed Last year

[wpt-sync] Sync PR 13018 - Test new SpeechSynthesisUtterance(null/undefined)

Categories

(Testing :: web-platform-tests, enhancement, P4)

enhancement

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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 <philip@foolip.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.)
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 wptsync@mozilla.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
https://hg.mozilla.org/mozilla-central/rev/89a485a70c00
https://hg.mozilla.org/mozilla-central/rev/1a703d10ac50
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.