Bug 1305344 - Add passing regression test. r=chunmin

Differential Revision: https://phabricator.services.mozilla.com/D66157
This commit is contained in:
Luka Zitnik 2020-05-05 23:40:49 +00:00
Родитель 590cd39d32
Коммит 2c88c506e4
3 изменённых файлов: 46 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,26 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test for Bug 1305344: Utterance not repeating in Firefox</title>
<script type="application/javascript">
window.SimpleTest = parent.SimpleTest;
window.ok = parent.ok;
</script>
<script src="common.js"></script>
</head>
<body>
<script>
var utterance = new SpeechSynthesisUtterance("repeating?");
var counter = 0;
utterance.addEventListener('start', function(e) {
if (counter++ === 1) {
ok(true)
SimpleTest.finish();
}
});
speechSynthesis.speak(utterance);
speechSynthesis.speak(utterance);
</script>
</body>
</html>

Просмотреть файл

@ -14,6 +14,7 @@ support-files =
file_global_queue.html
file_global_queue_cancel.html
file_global_queue_pause.html
file_speech_repeating_utterance.html
[test_setup.html]
[test_speech_queue.html]
@ -25,3 +26,4 @@ support-files =
[test_global_queue_cancel.html]
[test_global_queue_pause.html]
[test_bfcache.html]
[test_speech_repeating_utterance.html]

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test for Bug 1305344: Utterance not repeating in Firefox</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="common.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1305344">Mozilla Bug 1305344</a>
<iframe id="testFrame"></iframe>
<script>
SimpleTest.waitForExplicitFinish();
loadSpeechTest('file_speech_repeating_utterance.html');
</script>
</body>
</html>