mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests Reland "Add WPT for Web Speech API events" This reverts commit b259ae00ad118c94e05fe99a5e963cda2e3c485c. Reason for revert: Fixing the on-error test Original change's description: > Revert "Add WPT for Web Speech API events" > > This reverts commit 6b9b281088f658531546eddf186fb5076aa442a4. > > Reason for revert: Step "chrome_wpt_tests (retry shards) on Windows-11" failing on builder "chromium/ci/win11-arm64-rel-tests" > > Example failing build: ci.chromium.org/ui/p/chromium/builders/ci/win11-arm64-rel-tests/3472/overview > > Original change's description: > > Add WPT for Web Speech API events > > > > This CL adds some basic web platform tests to ensure that the onstart, onend, and onerror events are fired for the Web Speech API. > > > > Change-Id: Ieeaab551b95b56503917e468f9ec33d857790dad > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6137598 > > Commit-Queue: Evan Liu <[email protected]> > > Reviewed-by: Yiren Wang <[email protected]> > > Cr-Commit-Position: refs/heads/main@{#1402727} > > Change-Id: I6073a364b704f0aa9df1d7ed38820b3ae5ba4d78 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6147490 > Bot-Commit: Rubber Stamper <[email protected]> > Commit-Queue: Rubber Stamper <[email protected]> > Auto-Submit: Joshua Hood <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1402940} Change-Id: If34212a75aa5ac4bddc33d13846409a815ec9ff4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6149075 Reviewed-by: Yiren Wang <[email protected]> Commit-Queue: Evan Liu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1403265} -- wpt-commits: a0578972e3ed5ce7203fbe99559bed4b47310133 wpt-pr: 49956
27 lines
745 B
HTML
27 lines
745 B
HTML
<!DOCTYPE html>
|
|
<title>SpeechRecognition onerror event</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script>
|
|
promise_test(async t => {
|
|
window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
|
const recognition = new SpeechRecognition();
|
|
|
|
// Promise that resolves when the 'error' event is fired.
|
|
const errorPromise = new Promise(resolve => {
|
|
recognition.onerror = (event) => {
|
|
resolve();
|
|
};
|
|
});
|
|
|
|
// Start speech recognition.
|
|
recognition.start();
|
|
|
|
// Wait for the 'error' event.
|
|
await errorPromise;
|
|
|
|
// Stop speech recognition.
|
|
recognition.stop();
|
|
}, 'Speech recognition onerror event is called.');
|
|
</script>
|