Revision f76a95c7dcfc4553b8bbc67cf20bcacf816997fa authored by Geoffrey Sneddon on 25 April 2018, 21:33:28 UTC, committed by Geoffrey Sneddon on 30 April 2018, 12:46:37 UTC
1 parent 0ef9a74
SpeechSynthesis-speak-ownership.html
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe></iframe>
<script>
// using an utterance for different SpeechSynthesis instances should throw
test(t => {
// the utterance is short to make the test faster
const utter = new SpeechSynthesisUtterance('1');
const iframe = document.querySelector('iframe');
assert_not_equals(speechSynthesis, iframe.contentWindow.speechSynthesis);
speechSynthesis.speak(utter);
// the spec doesn't say what exception to throw:
// https://github.com/w3c/speech-api/issues/8
assert_throws(null, () => {
iframe.contentWindow.speechSynthesis.speak(utter);
});
}, 'Using the same SpeechSynthesisUtterance with two SpeechSynthesis instances');
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...