Automatic update from web-platform-tests Update on-device Web Speech API with spec changes This CL updates the Web Speech API with the following spec[1] changes: - Rename "availableOnDevice" and "installOnDevice" to "available" and "install" - Update both APIs to support querying availability/installing multiple languages in a single call via a new SpeechRecognitionOptions - Replace the SpeechRecognitionMode mode with a processLocally attribute [1] https://webaudio.github.io/web-speech-api/ Bug: 40286514 Change-Id: Ib9a924a1a69bcaa9cdde219c591bcd945bbe7a86 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6599497 Commit-Queue: Evan Liu <evliu@google.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Frank Liberato <liberato@chromium.org> Reviewed-by: Fred Shih <ffred@chromium.org> Cr-Commit-Position: refs/heads/main@{#1468347} -- wpt-commits: 02dd61b64c13e0d6c177af9b9e6d5f6dc06a4c70 wpt-pr: 52905
18 lines
836 B
HTML
18 lines
836 B
HTML
<!DOCTYPE html>
|
|
<title>SpeechRecognition basics</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script>
|
|
test(function() {
|
|
window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
|
const reco = new SpeechRecognition();
|
|
assert_equals(reco.grammars.length, 0, 'SpeechRecognition.grammars.length');
|
|
assert_equals(reco.lang, '', 'SpeechRecognition.lang');
|
|
assert_false(reco.continuous, 'SpeechRecognition.continuous');
|
|
assert_false(reco.interimResults, 'SpeechRecognition.interimResults');
|
|
assert_equals(reco.maxAlternatives, 1, 'SpeechRecognition.maxAlternatives');
|
|
assert_false(reco.processLocally, 'SpeechRecognition.processLocally');
|
|
assert_equals(reco.phrases.length, 0, 'SpeechRecognition.phrases.length');
|
|
});
|
|
</script>
|