blob: fdc8086f6f18db546db1b94951913de2368c7f45 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<div id="console"></div>
<script>
if (window.internals)
window.internals.enableMockSpeechSynthesizer();
description("This tests that an empty string sent to the synthesizer still generates a callback.");
if (window.testRunner)
testRunner.waitUntilDone();
window.jsTestIsAsync = true;
// Start a very short speaking job that will finish quickly.
var u = new SpeechSynthesisUtterance("");
u.onstart = function(event) {
shouldBeTrue("event.elapsedTime > 0");
shouldBeTrue("speechSynthesis.speaking");
}
u.onend = function(event) {
shouldBeTrue("event.elapsedTime > 0");
shouldBeFalse("speechSynthesis.speaking");
finishJSTest();
}
shouldBeFalse("speechSynthesis.speaking");
speechSynthesis.speak(u);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>