servo/tests/wpt/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html

18 lines
632 B
HTML

<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<body>
<script>
async_test(t => {
test_driver.bless('speechSynthesis.speak', t.step_func(() => {
const utter = new SpeechSynthesisUtterance('test');
utter.onerror = t.unreached_func('error event');
speechSynthesis.speak(utter);
utter.onstart = t.step_func(() => {
utter.onend = t.step_func_done();
});
}));
}, 'speechSynthesis.speak() fires start and end events');
</script>