https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f45c992c2cad60ea26546707423f8a18d6efcb43 authored by Mustaq Ahmed on 22 November 2018, 14:48:26 UTC
WIP: Fix testdriver clicks to make bluetooth wpt pass with UAv2.
Tip revision: f45c992
SpeechSynthesis-speak-ownership.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>
<iframe></iframe>
<script>
// using an utterance for different SpeechSynthesis instances should throw
async_test(t => {
  test_driver.bless('speechSynthesis.speak', t.step_func_done(() => {
    // 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>
back to top