Skip to content

Commit 07f8201

Browse files
evliu-googlemoz-wptsync-bot
authored andcommitted
Bug 1976096 [wpt PR 53634] - Replace SpeechRecognitionPhraseList with ObservableArray<SpeechRecognitionPhrase>, a=testonly
Automatic update from web-platform-tests Replace SpeechRecognitionPhraseList with ObservableArray<SpeechRecognitionPhrase> This CL replaces SpeechRecognitionPhraseList with ObservableArray<SpeechRecognitionPhrase>. Spec changes: WebAudio/web-speech-api#169 Bug: 381349238 Change-Id: I9cb4bdafd7c74cf48a4d7f3684af644df1eff4c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6696798 Reviewed-by: Domenic Denicola <[email protected]> Commit-Queue: Evan Liu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1483461} -- wpt-commits: 82b74727278342807e9b42c9f29ecc7bdddc0495 wpt-pr: 53634
1 parent e7a24b9 commit 07f8201

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

testing/web-platform/tests/speech-api/SpeechRecognition-phrases-manual.https.html

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,25 +64,20 @@
6464
);
6565
};
6666

67-
recognition1.phrases = new SpeechRecognitionPhraseList([
68-
new SpeechRecognitionPhrase("test", 1.0)
69-
]);
67+
recognition1.phrases.push(new SpeechRecognitionPhrase("test", 1.0));
7068

7169
// Create the second speech recognition with a mode that supports contextual biasing.
7270
const recognition2 = new SpeechRecognition();
7371
recognition2.processLocally = true;
7472
recognition2.lang = "en-US";
7573

76-
recognition2.onerror = function(event) {
77-
// Currently WPT may not be able to detect that SODA is available and
78-
// will throw a "language-not-supported" error here.
79-
assert_unreached("Caught an error: " + event.error);
80-
};
74+
// On-device speech recognition should not throw an error.
75+
recognition2.onerror = t.unreached_func("recognition2 should not error");
8176

82-
recognition2.phrases = new SpeechRecognitionPhraseList([
83-
new SpeechRecognitionPhrase("ASIC", 1.0),
84-
new SpeechRecognitionPhrase("FPGA", 1.0)
85-
]);
77+
recognition2.phrases = [
78+
new SpeechRecognitionPhrase("ASIC", 3.0),
79+
new SpeechRecognitionPhrase("FPGA", 3.0)
80+
];
8681

8782
const recognitionPromise = new Promise((resolve) => {
8883
recognition2.onresult = (event) => {

0 commit comments

Comments
 (0)