Bug 1495173 [wpt PR 13269] - Update interfaces/speech-api.idl, a=testonly
authorautofoolip <40241672+autofoolip@users.noreply.github.com>
Fri, 05 Oct 2018 14:21:34 +0000
changeset 495811 a79e5413cf505f8f4a71f574ad78768a56f6a7ef
parent 495810 5f90d6f37479adeccfb35a74ccc3c765a0f2a7ec
child 495812 c7ddb680470c8b83b6bd7ab8a12c5034a4ba523c
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1495173, 13269
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1495173 [wpt PR 13269] - Update interfaces/speech-api.idl, a=testonly Automatic update from web-platform-testsUpdate interfaces/speech-api.idl (#13269) Source: https://github.com/tidoust/reffy-reports/blob/57753a9/whatwg/idl/speech-api.idl Build: https://travis-ci.org/tidoust/reffy-reports/builds/435173976 -- wpt-commits: 43c82af0f9ac10092750d854c59369cd2ed8c461 wpt-pr: 13269
testing/web-platform/tests/interfaces/speech-api.idl
--- a/testing/web-platform/tests/interfaces/speech-api.idl
+++ b/testing/web-platform/tests/interfaces/speech-api.idl
@@ -38,22 +38,28 @@ enum SpeechRecognitionErrorCode {
     "audio-capture",
     "network",
     "not-allowed",
     "service-not-allowed",
     "bad-grammar",
     "language-not-supported"
 };
 
-[Exposed=Window]
+[Exposed=Window,
+ Constructor(DOMString type, SpeechRecognitionErrorEventInit eventInitDict)]
 interface SpeechRecognitionErrorEvent : Event {
     readonly attribute SpeechRecognitionErrorCode error;
     readonly attribute DOMString message;
 };
 
+dictionary SpeechRecognitionErrorEventInit : EventInit {
+    required SpeechRecognitionErrorCode error;
+    DOMString message = "";
+};
+
 // Item in N-best list
 [Exposed=Window]
 interface SpeechRecognitionAlternative {
     readonly attribute DOMString transcript;
     readonly attribute float confidence;
 };
 
 // A complete one-shot simple response
@@ -67,24 +73,32 @@ interface SpeechRecognitionResult {
 // A collection of responses (used in continuous mode)
 [Exposed=Window]
 interface SpeechRecognitionResultList {
     readonly attribute unsigned long length;
     getter SpeechRecognitionResult item(unsigned long index);
 };
 
 // A full response, which could be interim or final, part of a continuous response or not
-[Exposed=Window]
+[Exposed=Window,
+ Constructor(DOMString type, SpeechRecognitionEventInit eventInitDict)]
 interface SpeechRecognitionEvent : Event {
     readonly attribute unsigned long resultIndex;
     readonly attribute SpeechRecognitionResultList results;
     readonly attribute any interpretation;
     readonly attribute Document? emma;
 };
 
+dictionary SpeechRecognitionEventInit : EventInit {
+    unsigned long resultIndex = 0;
+    required SpeechRecognitionResultList results;
+    any interpretation = null;
+    Document? emma = null;
+};
+
 // The object representing a speech grammar
 [Exposed=Window, Constructor]
 interface SpeechGrammar {
     attribute DOMString src;
     attribute float weight;
 };
 
 // The object representing a speech grammar collection
@@ -133,17 +147,17 @@ interface SpeechSynthesisUtterance : Eve
     attribute EventHandler onerror;
     attribute EventHandler onpause;
     attribute EventHandler onresume;
     attribute EventHandler onmark;
     attribute EventHandler onboundary;
 };
 
 [Exposed=Window,
-  Constructor(DOMString type, SpeechSynthesisEventInit eventInitDict)]
+ Constructor(DOMString type, SpeechSynthesisEventInit eventInitDict)]
 interface SpeechSynthesisEvent : Event {
     readonly attribute SpeechSynthesisUtterance utterance;
     readonly attribute unsigned long charIndex;
     readonly attribute float elapsedTime;
     readonly attribute DOMString name;
 };
 
 dictionary SpeechSynthesisEventInit : EventInit {
@@ -164,17 +178,17 @@ enum SpeechSynthesisErrorCode {
     "language-unavailable",
     "voice-unavailable",
     "text-too-long",
     "invalid-argument",
     "not-allowed",
 };
 
 [Exposed=Window,
-  Constructor(DOMString type, SpeechSynthesisErrorEventInit eventInitDict)]
+ Constructor(DOMString type, SpeechSynthesisErrorEventInit eventInitDict)]
 interface SpeechSynthesisErrorEvent : SpeechSynthesisEvent {
     readonly attribute SpeechSynthesisErrorCode error;
 };
 
 dictionary SpeechSynthesisErrorEventInit : SpeechSynthesisEventInit {
     required SpeechSynthesisErrorCode error;
 };