<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[279400] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/279400">279400</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2021-06-29 19:13:41 -0700 (Tue, 29 Jun 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Resync speech-api WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227503

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Resync speech-api WPT tests from upstream a38612f39e7752c353208.

* web-platform-tests/speech-api/*: Updated.

LayoutTests:

* platform/ios/TestExpectations:
* platform/mac/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiMETAyml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/META.yml</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakwithoutactivationfailstentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisUtterancebasicshttpsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisUtterancebasicshttpshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapihistoricalexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/historical-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapihistoricalhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/historical.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiidlharnesswindowjs">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/idlharness.window.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiwebspeechjs">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/webspeech.js</a></li>
<li><a href="#trunkLayoutTestsplatformiosTestExpectations">trunk/LayoutTests/platform/ios/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformioswk2TestExpectations">trunk/LayoutTests/platform/ios-wk2/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesispauseresumetentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesispauseresumetentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakeventsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakeventshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisErrorEventconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisErrorEventconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisEventconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisEventconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor.html</a></li>
<li>trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/speech-api/</li>
<li><a href="#trunkLayoutTestsplatformmacwk1importedw3cwebplatformtestsspeechapiSpeechSynthesisspeakeventsexpectedtxt">trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakownershipexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakownershiphtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakwithactivationsucceedsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakwithactivationsucceedshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/ChangeLog 2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2021-06-29  Chris Dumez  <cdumez@apple.com>
+
+        Resync speech-api WPT tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=227503
+
+        Reviewed by Sam Weinig.
+
+        * platform/ios/TestExpectations:
+        * platform/mac/TestExpectations:
+
</ins><span class="cx"> 2021-06-29  Arcady Goldmints-Orlov  <agoldmints@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [GLIB] Unreviewed test gardening, update baselines after r279169
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/ChangeLog    2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2021-06-29  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><ins>+        Resync speech-api WPT tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=227503
+
+        Reviewed by Sam Weinig.
+
+        Resync speech-api WPT tests from upstream a38612f39e7752c353208.
+
+        * web-platform-tests/speech-api/*: Updated.
+
+2021-06-29  Chris Dumez  <cdumez@apple.com>
+
</ins><span class="cx">         Resync css/cssom WPT tests from upstream
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=227506
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiMETAyml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/META.yml (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/META.yml    2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/META.yml       2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><del>-spec: https://w3c.github.io/speech-api/
</del><ins>+spec: https://wicg.github.io/speech-api/
</ins><span class="cx"> suggested_reviewers:
</span><span class="cx">   - andrenatal
</span><del>-  - gshires
</del><ins>+  - foolip
+  - marcoscaceres
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesispauseresumetentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative-expected.txt (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative-expected.txt                         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative-expected.txt    2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS speechSynthesis.pause() and resume() state and events
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesispauseresumetentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative.html (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative.html                         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative.html    2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+<!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>
+<body>
+<script>
+// This test is tentative because timing isn't defined:
+// https://github.com/w3c/speech-api/issues/39
+// https://github.com/w3c/speech-api/issues/40
+async_test(t => {
+  assert_false(speechSynthesis.paused, 'initial paused state');
+
+  test_driver.bless('speechSynthesis.speak', t.step_func(() => {
+    const sentence = `long sentence which will take at least a few seconds to
+      utter so that it's possible to pause and resume before the end`;
+    const utter = new SpeechSynthesisUtterance(sentence);
+    t.add_cleanup(() => speechSynthesis.pause());
+    utter.onerror = t.unreached_func('error event');
+
+    speechSynthesis.speak(utter);
+
+    assert_false(speechSynthesis.paused, 'paused state after speak()');
+
+    utter.onstart = t.step_func(() => {
+      utter.onstart = null;
+      assert_false(speechSynthesis.paused, 'paused state at start event');
+
+      speechSynthesis.pause();
+
+      // paused state changes async, right before the pause event
+      assert_false(speechSynthesis.paused, 'paused state after pause()');
+
+      utter.onpause = t.step_func(() => {
+        utter.onpause = null;
+        assert_true(speechSynthesis.paused, 'paused state at pause event');
+
+        speechSynthesis.resume();
+
+        // paused state changes async, right before the resume event
+        assert_true(speechSynthesis.paused, 'paused state after resume()');
+
+        utter.onresume = t.step_func_done(() => {
+          assert_false(speechSynthesis.paused, 'paused state at resume event');
+        });
+      });
+    });
+  }));
+}, 'speechSynthesis.pause() and resume() state and events');
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakeventsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt                           (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt      2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL speechSynthesis.speak() fires start and end events with empty utterance assert_true: Not expecting event, but got end event expected true got false
+PASS speechSynthesis.speak() fires start and end events
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakeventshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html                           (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html      2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<!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>
+<body>
+<script>
+async function runStartEndTest(t, utterance) {
+  const eventWatcher = new EventWatcher(t, utterance, ['start', 'end', 'error']);
+  await test_driver.bless('speechSynthesis.speak',
+      () => speechSynthesis.speak(utterance));
+  await eventWatcher.wait_for(['start', 'end']);
+}
+promise_test(async (t) => {
+  const utterance = new SpeechSynthesisUtterance();
+  await runStartEndTest(t, utterance);
+}, 'speechSynthesis.speak() fires start and end events with empty utterance');
+promise_test(async (t) => {
+  const utterance = new SpeechSynthesisUtterance('test');
+  await runStartEndTest(t, utterance);
+}, 'speechSynthesis.speak() fires start and end events');
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakownershipexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership-expected.txt (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership-expected.txt        2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership-expected.txt   2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1,4 +0,0 @@
</span><del>-
-
-FAIL Using the same SpeechSynthesisUtterance with two SpeechSynthesis instances Can't find variable: assert_throws
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakownershiphtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership.html (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership.html        2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership.html   2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1,23 +0,0 @@
</span><del>-<!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>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakwithactivationsucceedsexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds-expected.txt (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds-expected.txt 2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds-expected.txt    2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-
-PASS speechSynthesis.speak requires user activation
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakwithactivationsucceedshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds.html (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds.html 2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds.html    2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-<!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>
-<body>
-<script>
-async_test(t => {
-  test_driver.bless('speechSynthesis.speak', t.step_func(() => {
-    const utter = new SpeechSynthesisUtterance('1');
-    utter.onend = t.step_func_done();
-    speechSynthesis.speak(utter);
-  }));
-}, 'speechSynthesis.speak requires user activation');
-</script>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisspeakwithoutactivationfailstentativehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html       2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html  2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> async_test(t => {
</span><span class="cx">   const utter = new SpeechSynthesisUtterance('1');
</span><span class="cx">   utter.onerror = t.step_func_done((e) => {
</span><del>-    assert_equals(e.name, "not-allowed");
</del><ins>+    assert_equals(e.error, "not-allowed");
</ins><span class="cx">   });
</span><span class="cx">   utter.onend = t.step_func_done(() => assert_unreached());
</span><span class="cx">   speechSynthesis.speak(utter);
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisErrorEventconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor-expected.txt (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor-expected.txt                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor-expected.txt     2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+
+FAIL SpeechSynthesisErrorEvent with no arguments throws TypeError assert_throws_js: function "() => {
+    new SpeechSynthesisErrorEvent();
+  }" threw object "ReferenceError: Can't find variable: SpeechSynthesisErrorEvent" ("ReferenceError") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL SpeechSynthesisErrorEvent with no eventInitDict throws TypeError assert_throws_js: function "() => {
+    new SpeechSynthesisErrorEvent("type");
+  }" threw object "ReferenceError: Can't find variable: SpeechSynthesisErrorEvent" ("ReferenceError") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL SpeechSynthesisErrorEvent with empty eventInitDict throws TypeError (requires
+    utterance and error) assert_throws_js: function "() => {
+    new SpeechSynthesisErrorEvent("type", {});
+  }" threw object "ReferenceError: Can't find variable: SpeechSynthesisErrorEvent" ("ReferenceError") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL SpeechSynthesisErrorEvent with eventInitDict without utterance throws
+    TypeError assert_throws_js: function "() => {
+    new SpeechSynthesisErrorEvent("type", {error:"not-allowed"});
+  }" threw object "ReferenceError: Can't find variable: SpeechSynthesisErrorEvent" ("ReferenceError") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL SpeechSynthesisErrorEvent with eventInitDict without error throws
+    TypeError assert_throws_js: function "() => {
+    new SpeechSynthesisErrorEvent("type", {utterance: new SpeechSynthesisUtterance()});
+  }" threw object "ReferenceError: Can't find variable: SpeechSynthesisErrorEvent" ("ReferenceError") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL SpeechSynthesisErrorEvent with eventInitDict having utterance and error Can't find variable: SpeechSynthesisErrorEvent
+FAIL SpeechSynthesisErrorEvent with custom eventInitDict Can't find variable: SpeechSynthesisErrorEvent
+FAIL SpeechSynthesisErrorEvent with wrong error enum assert_throws_js: function "() => {
+      new SpeechSynthesisErrorEvent("type", {
+        utterance: new SpeechSynthesisUtterance(),
+        error: error
+      });
+    }" threw object "ReferenceError: Can't find variable: SpeechSynthesisErrorEvent" ("ReferenceError") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisErrorEventconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor.html (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor.html                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor.html     2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,88 @@
</span><ins>+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+/*
+[Exposed=Window,
+ Constructor(DOMString type, SpeechSynthesisErrorEventInit eventInitDict)]
+interface SpeechSynthesisErrorEvent : SpeechSynthesisErrorEvent {
+    readonly attribute SpeechSynthesisErrorCode error;
+};
+*/
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisErrorEvent();
+  });
+}, "SpeechSynthesisErrorEvent with no arguments throws TypeError");
+
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisErrorEvent("type");
+  });
+}, "SpeechSynthesisErrorEvent with no eventInitDict throws TypeError");
+
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisErrorEvent("type", {});
+  });
+}, `SpeechSynthesisErrorEvent with empty eventInitDict throws TypeError (requires
+    utterance and error)`);
+
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisErrorEvent("type", {error:"not-allowed"});
+  });
+}, `SpeechSynthesisErrorEvent with eventInitDict without utterance throws
+    TypeError`);
+
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisErrorEvent("type", {utterance: new SpeechSynthesisUtterance()});
+  });
+}, `SpeechSynthesisErrorEvent with eventInitDict without error throws
+    TypeError`);
+
+test(() => {
+  const utterance = new SpeechSynthesisUtterance("foo");
+  const event = new SpeechSynthesisErrorEvent("type", {utterance: utterance, error:"not-allowed"});
+  assert_equals(event.utterance, utterance);
+  assert_equals(event.error, "not-allowed");
+  assert_equals(event.charIndex, 0);
+  assert_equals(event.elapsedTime, 0);
+  assert_equals(event.name, "");
+}, "SpeechSynthesisErrorEvent with eventInitDict having utterance and error");
+
+test(() => {
+  const utterance = new SpeechSynthesisUtterance("foo");
+  const event = new SpeechSynthesisErrorEvent("type", {
+    utterance: utterance,
+    charIndex: 5,
+    elapsedTime: 100,
+    name: "foo",
+    error: "synthesis-failed"
+  });
+  assert_equals(event.bubbles, false);
+  assert_equals(event.cancelable, false);
+  assert_equals(event.type, "type");
+  assert_equals(event.utterance, utterance);
+  assert_equals(event.charIndex, 5);
+  assert_equals(event.elapsedTime, 100);
+  assert_equals(event.name, "foo");
+  assert_equals(event.error, "synthesis-failed");
+}, "SpeechSynthesisErrorEvent with custom eventInitDict");
+
+test(() => {
+  function createEventFunc(error) {
+    return () => {
+      new SpeechSynthesisErrorEvent("type", {
+        utterance: new SpeechSynthesisUtterance(),
+        error: error
+      });
+    };
+  };
+  assert_throws_js(TypeError, createEventFunc(""));
+  assert_throws_js(TypeError, createEventFunc("foo"));
+  assert_throws_js(TypeError, createEventFunc("bar"));
+}, "SpeechSynthesisErrorEvent with wrong error enum");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisEventconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor-expected.txt (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor-expected.txt                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor-expected.txt  2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+PASS SpeechSynthesisEvent with no arguments throws TypeError
+PASS SpeechSynthesisEvent with no eventInitDict throws TypeError
+PASS SpeechSynthesisEvent with empty eventInitDict throws TypeError (requires
+    utterance)
+PASS SpeechSynthesisEvent with eventInitDict not having utterance throws
+    TypeError
+FAIL SpeechSynthesisEvent with eventInitDict having an utterance Illegal constructor
+FAIL SpeechSynthesisEvent with custom eventInitDict Illegal constructor
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisEventconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor.html (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor.html                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor.html  2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+/*
+[Exposed=Window,
+ Constructor(DOMString type, SpeechSynthesisEventInit eventInitDict)]
+interface SpeechSynthesisEvent : Event {
+    readonly attribute SpeechSynthesisUtterance utterance;
+    readonly attribute unsigned long charIndex;
+    readonly attribute float elapsedTime;
+    readonly attribute DOMString name;
+};
+*/
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisEvent();
+  });
+}, "SpeechSynthesisEvent with no arguments throws TypeError");
+
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisEvent("type");
+  });
+}, "SpeechSynthesisEvent with no eventInitDict throws TypeError");
+
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisEvent("type", {});
+  });
+}, `SpeechSynthesisEvent with empty eventInitDict throws TypeError (requires
+    utterance)`);
+
+test(() => {
+  assert_throws_js(TypeError, () => {
+    new SpeechSynthesisEvent("type", {charIndex: 10, elapsedTime: 50, name:"foo"});
+  });
+}, `SpeechSynthesisEvent with eventInitDict not having utterance throws
+    TypeError`);
+
+test(() => {
+  const utterance = new SpeechSynthesisUtterance("foo");
+  const event = new SpeechSynthesisEvent("type", {utterance: utterance});
+  assert_equals(event.utterance, utterance);
+  assert_equals(event.charIndex, 0);
+  assert_equals(event.charLength, 0);
+  assert_equals(event.elapsedTime, 0);
+  assert_equals(event.name, "");
+}, "SpeechSynthesisEvent with eventInitDict having an utterance");
+
+test(() => {
+  const utterance = new SpeechSynthesisUtterance("foo");
+  const event = new SpeechSynthesisEvent("type", {
+    utterance: utterance,
+    charIndex: 5,
+    charLength: 3,
+    elapsedTime: 100,
+    name: "foo"
+  });
+  assert_equals(event.bubbles, false);
+  assert_equals(event.cancelable, false);
+  assert_equals(event.type, "type");
+  assert_equals(event.utterance, utterance);
+  assert_equals(event.charIndex, 5);
+  assert_equals(event.charLength, 3);
+  assert_equals(event.elapsedTime, 100);
+  assert_equals(event.name, "foo");
+}, "SpeechSynthesisEvent with custom eventInitDict");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisUtterancebasicshttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https-expected.txt (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https-expected.txt  2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https-expected.txt     2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -6,5 +6,7 @@
</span><span class="cx"> PASS new SpeechSynthesisUtterance() default rate
</span><span class="cx"> PASS new SpeechSynthesisUtterance() default pitch
</span><span class="cx"> PASS new SpeechSynthesisUtterance("hello") text and defaults
</span><ins>+PASS new SpeechSynthesisUtterance(null)
+PASS new SpeechSynthesisUtterance(undefined)
</ins><span class="cx"> PASS SpeechSynthesisUtterance text setter
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiSpeechSynthesisUtterancebasicshttpshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https.html (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https.html  2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https.html     2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -31,6 +31,17 @@
</span><span class="cx"> }, 'new SpeechSynthesisUtterance("hello") text and defaults');
</span><span class="cx"> 
</span><span class="cx"> test(function() {
</span><ins>+  const utt = new SpeechSynthesisUtterance(null);
+  assert_equals(utt.text, 'null');
+}, 'new SpeechSynthesisUtterance(null)');
+
+test(function() {
+  const utt = new SpeechSynthesisUtterance(undefined);
+  // See https://github.com/w3c/speech-api/pull/48.
+  assert_equals(utt.text, '');
+}, 'new SpeechSynthesisUtterance(undefined)');
+
+test(function() {
</ins><span class="cx">   const utt = new SpeechSynthesisUtterance();
</span><span class="cx">   utt.text = 'word';
</span><span class="cx">   assert_equals(utt.text, 'word');
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapihistoricalexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/historical-expected.txt (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/historical-expected.txt     2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/historical-expected.txt        2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -5,4 +5,7 @@
</span><span class="cx"> FAIL webkitSpeechRecognition interface should not exist assert_false: expected false got true
</span><span class="cx"> PASS webkitSpeechRecognitionError interface should not exist
</span><span class="cx"> PASS webkitSpeechRecognitionEvent interface should not exist
</span><ins>+FAIL SpeechRecognition's serviceURI attribute should not exist assert_implements: SpeechRecognition exposed undefined
+PASS SpeechRecognitionEvent's interpretation attribute should not exist
+PASS SpeechRecognitionEvent's emma attribute should not exist
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapihistoricalhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/historical.html (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/historical.html     2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/historical.html        2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -12,8 +12,23 @@
</span><span class="cx">   "webkitSpeechRecognitionError",
</span><span class="cx">   "webkitSpeechRecognitionEvent",
</span><span class="cx"> ].forEach(name => {
</span><del>-  test(function() {
</del><ins>+  test(() => {
</ins><span class="cx">     assert_false(name in window);
</span><del>-  }, name + " interface should not exist");
</del><ins>+  }, `${name} interface should not exist`);
</ins><span class="cx"> });
</span><ins>+
+test(() => {
+  assert_implements('SpeechRecognition' in window, 'SpeechRecognition exposed');
+  assert_false("serviceURI" in SpeechRecognition.prototype);
+}, "SpeechRecognition's serviceURI attribute should not exist");
+
+[
+  "interpretation",
+  "emma",
+].forEach(name => {
+  test(() => {
+    assert_implements('SpeechRecognitionEvent' in window, 'SpeechRecognitionEvent exposed');
+    assert_false(name in SpeechRecognitionEvent.prototype);
+  }, `SpeechRecognitionEvent's ${name} attribute should not exist`);
+});
</ins><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiidlharnesswindowjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/idlharness.window.js (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/idlharness.window.js        2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/idlharness.window.js   2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1,12 +1,30 @@
</span><span class="cx"> // META: script=/resources/WebIDLParser.js
</span><span class="cx"> // META: script=/resources/idlharness.js
</span><ins>+// META: timeout=long
</ins><span class="cx"> 
</span><span class="cx"> 'use strict';
</span><span class="cx"> 
</span><ins>+// https://w3c.github.io/speech-api/#dom-speechsynthesis-getvoices can
+// return an empty list and a voiceschanged event is fired if the list of
+// voices is determined asynchronously.
+function getVoices() {
+  return new Promise(resolve => {
+    const voices = speechSynthesis.getVoices();
+    if (voices.length) {
+        resolve(voices);
+    } else {
+        // wait for voiceschanged event
+        speechSynthesis.addEventListener('voiceschanged', () => {
+          resolve(speechSynthesis.getVoices());
+        }, { once: true });
+      }
+  });
+}
+
</ins><span class="cx"> idl_test(
</span><span class="cx">   ['speech-api'],
</span><span class="cx">   ['dom', 'html'],
</span><del>-  idl_array => {
</del><ins>+  (idl_array, t) => {
</ins><span class="cx">     idl_array.add_objects({
</span><span class="cx">       SpeechGrammar: ['new SpeechGrammar()'],
</span><span class="cx">       SpeechGrammarList: ['new SpeechGrammarList()'],
</span><span class="lines">@@ -20,15 +38,14 @@
</span><span class="cx">       // TODO: SpeechSynthesisErrorEvent
</span><span class="cx">       // TODO: SpeechSynthesisEvent
</span><span class="cx">       SpeechSynthesisUtterance: ['new SpeechSynthesisUtterance()'],
</span><ins>+      SpeechSynthesisVoice: ['voice'],
</ins><span class="cx">       Window: ['self'],
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    // https://w3c.github.io/speech-api/#dom-speechsynthesis-getvoices can
-    // return an empty list, so add SpeechSynthesisVoice conditionally.
-    const voices = speechSynthesis.getVoices();
-    if (voices.length) {
-      self.voice = voices[0];
-      idl_array.add_objects({ SpeechSynthesisVoice: ['voice'] });
-    }
</del><ins>+    const awaitVoice = getVoices().then(voices => self.voice = voices[0]);
+    const timeout = new Promise((_, reject) => {
+      t.step_timeout(() => reject('Timed out waiting for voice'), 3000);
+    });
+    return Promise.race([awaitVoice, timeout]);
</ins><span class="cx">   }
</span><span class="cx"> );
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/w3c-import.log (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/w3c-import.log      2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/w3c-import.log 2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -16,10 +16,12 @@
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/speech-api/META.yml
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechRecognition-basics.https.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-ownership.html
</del><ins>+/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-twice.html
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds.html
</del><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisErrorEvent-constructor.html
+/LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisEvent-constructor.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/speech-api/SpeechSynthesisUtterance-basics.https.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/speech-api/historical.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/speech-api/idlharness.window.js
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsspeechapiwebspeechjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/webspeech.js (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/webspeech.js        2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/speech-api/webspeech.js   2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -6,9 +6,8 @@
</span><span class="cx"> GLOBAL_TIMEOUT = TIMEOUT + 2000;  // In milliseconds.
</span><span class="cx"> setup({timeout: GLOBAL_TIMEOUT});
</span><span class="cx"> var onstarted = false;
</span><del>-var neverFireTest = async_test('Events that should not fire',
-                               {timeout: TIMEOUT});
-var onstartTest = async_test('onstart', {timeout: TIMEOUT});
</del><ins>+var neverFireTest = async_test('Events that should not fire');
+var onstartTest = async_test('onstart');
</ins><span class="cx"> var reco = new SpeechRecognition();
</span><span class="cx"> 
</span><span class="cx"> reco.onstart = onstartTest.step_func(function(event) {
</span><span class="lines">@@ -41,7 +40,7 @@
</span><span class="cx">   this.min = min;
</span><span class="cx">   this.max = max;
</span><span class="cx">   this.sum = 0;
</span><del>-  this.asyncTest = async_test(name, {timeout: TIMEOUT});
</del><ins>+  this.asyncTest = async_test(name);
</ins><span class="cx"> 
</span><span class="cx">   this.count = function(increment) { this.sum += increment; };
</span><span class="cx"> 
</span><span class="lines">@@ -52,7 +51,7 @@
</span><span class="cx">     this.asyncTest.step(function() {
</span><span class="cx">       notes.innerHTML += cTest.name + ' occurred ' + cTest.sum + ' times.<br>';
</span><span class="cx">       if (cTest.min == cTest.max) {
</span><del>-        assert_true(cTest.sum == cTest.min, cTest.name + ' occurred ' +
</del><ins>+        assert_equals(cTest.sum, cTest.min, cTest.name + ' occurred ' +
</ins><span class="cx">           cTest.sum + ' times and should have occurred ' +
</span><span class="cx">           cTest.min + ' times.');
</span><span class="cx">       } else {
</span><span class="lines">@@ -77,7 +76,7 @@
</span><span class="cx">   this.name = name;
</span><span class="cx">   this.count = 0;  // Counts number of start / end cycles.
</span><span class="cx">   this.started = false; // Tracks whether last event was a start or end event.
</span><del>-  this.test = async_test(name + ' start/stop', {timeout: TIMEOUT});
</del><ins>+  this.test = async_test(name + ' start/stop');
</ins><span class="cx"> 
</span><span class="cx">   this.startEvent = function() {
</span><span class="cx">     var cycle = this;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiosTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios/TestExpectations (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios/TestExpectations  2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/platform/ios/TestExpectations     2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -3333,8 +3333,8 @@
</span><span class="cx"> media/media-continues-playing-after-replace-source.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="cx"> imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-twice.html [ Skip ]
</span><del>-imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds.html [ Skip ]
</del><span class="cx"> imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html [ Skip ]
</span><ins>+webkit.org/b/227501 [ Debug ] imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # This test fails in iOS due to subpixel differences for the marker position
</span><span class="cx"> imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformioswk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-wk2/TestExpectations      2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -1928,6 +1928,9 @@
</span><span class="cx"> webanimations/transform-property-and-transform-animation-with-delay-on-forced-layer.html [ Pass ]
</span><span class="cx"> webanimations/translate-property-and-translate-animation-with-delay-on-forced-layer.html [ Pass ]
</span><span class="cx"> 
</span><ins>+imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative.html [ Pass Failure ]
+imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html [ Pass Failure ]
+
</ins><span class="cx"> # @counter-style WPT failures specific to ios-wk2
</span><span class="cx"> imported/w3c/web-platform-tests/css/css-counter-styles/bengali/css3-counter-styles-117.html [ ImageOnlyFailure ]
</span><span class="cx"> imported/w3c/web-platform-tests/css/css-counter-styles/gujarati/css3-counter-styles-123.html [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations  2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/platform/mac/TestExpectations     2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -2089,8 +2089,8 @@
</span><span class="cx"> webkit.org/b/217620 inspector/audit/basic-async.html [ Pass Timeout ]
</span><span class="cx"> 
</span><span class="cx"> imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-twice.html [ Skip ]
</span><del>-imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-with-activation-succeeds.html [ Skip ]
</del><span class="cx"> imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-without-activation-fails.tentative.html [ Skip ]
</span><ins>+webkit.org/b/227501 [ Debug ] imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> webkit.org/b/217669 http/wpt/service-workers/service-worker-spinning-message.https.html [ Pass Failure ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (279399 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations      2021-06-30 02:12:15 UTC (rev 279399)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -74,6 +74,7 @@
</span><span class="cx"> 
</span><span class="cx"> fast/speechrecognition/start-recognition-after-gum.html [ Skip ]
</span><span class="cx"> fast/speechrecognition/start-recognition-after-denied-gum.html [ Skip ]
</span><ins>+imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-pause-resume.tentative.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # Datalist is unsupported in WK1
</span><span class="cx"> accessibility/datalist.html [ WontFix ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1importedw3cwebplatformtestsspeechapiSpeechSynthesisspeakeventsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt (0 => 279400)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt                          (rev 0)
+++ trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt     2021-06-30 02:13:41 UTC (rev 279400)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL speechSynthesis.speak() fires start and end events with empty utterance assert_true: Not expecting event, but got end event expected true got false
+FAIL speechSynthesis.speak() fires start and end events assert_true: Not expecting event, but got start event expected true got false
+
</ins></span></pre>
</div>
</div>

</body>
</html>