Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html - WPT Dashboard Interop Dashboard
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
// TODO(csharrison): Make this test not tentative once
async_test(t => {
const utter = new SpeechSynthesisUtterance('1');
utter.onerror = t.step_func_done((e) => {
assert_equals(e.error, "not-allowed");
});
utter.onend = t.unreached_func('end event');
speechSynthesis.speak(utter);
}, 'speechSynthesis.speak requires user activation');
</script>