Bug 1305344 - Add passing regression test. r=chunmin
authorLuka Zitnik <luka.zitnik@embroker.com>
Tue, 05 May 2020 23:40:49 +0000
changeset 528310 320b571a080134bb5010c4a388e6f87a7a633306
parent 528309 247592e4f235f775760756086a1611923076e801
child 528311 5db356e1bb9414fff740f81c03c07e9a2dfb3561
push id37383
push userrgurzau@mozilla.com
push dateWed, 06 May 2020 09:37:16 +0000
treeherdermozilla-central@1fa1d4f4b0e2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschunmin
bugs1305344
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1305344 - Add passing regression test. r=chunmin Differential Revision: https://phabricator.services.mozilla.com/D66157
dom/media/webspeech/synth/test/file_speech_repeating_utterance.html
dom/media/webspeech/synth/test/mochitest.ini
dom/media/webspeech/synth/test/test_speech_repeating_utterance.html
new file mode 100644
--- /dev/null
+++ b/dom/media/webspeech/synth/test/file_speech_repeating_utterance.html
@@ -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>
--- a/dom/media/webspeech/synth/test/mochitest.ini
+++ b/dom/media/webspeech/synth/test/mochitest.ini
@@ -9,19 +9,21 @@ support-files =
   file_speech_queue.html
   file_speech_simple.html
   file_speech_cancel.html
   file_speech_error.html
   file_indirect_service_events.html
   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]
 [test_speech_simple.html]
 [test_speech_cancel.html]
 [test_speech_error.html]
 [test_indirect_service_events.html]
 [test_global_queue.html]
 [test_global_queue_cancel.html]
 [test_global_queue_pause.html]
 [test_bfcache.html]
+[test_speech_repeating_utterance.html]
new file mode 100644
--- /dev/null
+++ b/dom/media/webspeech/synth/test/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>