SpeechSynthesis-speak-without-activation-fails.tentative.html (558B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <body> 5 <script> 6 // TODO(csharrison): Make this test not tentative once 7 // https://github.com/w3c/speech-api/issues/35 is resolved. 8 async_test(t => { 9 const utter = new SpeechSynthesisUtterance('1'); 10 utter.onerror = t.step_func_done((e) => { 11 assert_equals(e.error, "not-allowed"); 12 }); 13 utter.onend = t.unreached_func('end event'); 14 speechSynthesis.speak(utter); 15 }, 'speechSynthesis.speak requires user activation'); 16 </script>