Update web-platform-tests to revision 70fdd27f4cecb8a5cae3dafa76ba05265531c9e2

This commit is contained in:
WPT Sync Bot 2019-11-10 10:27:24 +00:00
parent e5689df6b4
commit bea56037ef
701 changed files with 13864 additions and 1909 deletions

View file

@ -5,14 +5,18 @@
<script src="/resources/testdriver-vendor.js"></script>
<body>
<script>
async_test(t => {
test_driver.bless('speechSynthesis.speak', t.step_func(() => {
const utter = new SpeechSynthesisUtterance('test');
utter.onerror = t.unreached_func('error event');
speechSynthesis.speak(utter);
utter.onstart = t.step_func(() => {
utter.onend = t.step_func_done();
});
}));
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>

View file

@ -18,11 +18,7 @@
});
test(() => {
if (!window.SpeechRecognition) {
// TODO(foolip): use `t.skip()` after
// https://github.com/web-platform-tests/rfcs/pull/16 is done.
return;
}
assert_precondition('SpeechRecognition' in window, 'SpeechRecognition exposed');
assert_false("serviceURI" in SpeechRecognition.prototype);
}, "SpeechRecognition's serviceURI attribute should not exist");
@ -31,11 +27,7 @@ test(() => {
"emma",
].forEach(name => {
test(() => {
if (!window.SpeechRecognitionEvent) {
// TODO(foolip): use `t.skip()` after
// https://github.com/web-platform-tests/rfcs/pull/16 is done.
return;
}
assert_precondition('SpeechRecognitionEvent' in window, 'SpeechRecognitionEvent exposed');
assert_false(name in SpeechRecognitionEvent.prototype);
}, `SpeechRecognitionEvent's ${name} attribute should not exist`);
});