Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-voice.html

Issue 2489123002: Drop LegacyInterfaceTypeChecking for SpeechSynthesisUtterance (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>SpeechSynthesisUtterance voice attribute</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 test(() => {
7 const u = new SpeechSynthesisUtterance();
8 assert_equals(u.voice, null);
9 }, 'initial state');
10
11 test(() => {
12 const u = new SpeechSynthesisUtterance();
13 u.voice = null;
14 assert_equals(u.voice, null);
15 u.voice = undefined;
16 assert_equals(u.voice, null);
17 }, 'setting to null/undefined');
18
19 test(() => {
20 const u = new SpeechSynthesisUtterance();
21 for (const value of [{}, "", window]) {
22 assert_throws(new TypeError, () => { u.voice = value; } );
23 assert_equals(u.voice, null);
24 }
25 }, 'setting to non-SpeechSynthesisVoice values');
26
27 test(() => {
28 internals.enableMockSpeechSynthesizer(document);
29
30 const u = new SpeechSynthesisUtterance();
31 const voice = speechSynthesis.getVoices()[0];
32 // TODO(foolip): This should test instanceof SpeechSynthesisVoice when that
33 // interface is exposed.
34 assert_equals(typeof voice, "object");
35 u.voice = voice;
36 assert_equals(u.voice, voice);
37 }, 'setting to SpeechSynthesisVoice');
38 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698