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

Side by Side Diff: LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-basics.html

Issue 933523004: Add TypeChecking=Unrestricted to Speech API interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>SpeechSynthesisUtterance: Basic interface tests</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 setup(function() {
7 if (window.internals)
8 window.internals.enableMockSpeechSynthesizer(document);
9 });
10
11 test(function() {
12 var utterance = new SpeechSynthesisUtterance(" ");
13 var restrictedFloatAttributes = [ 'volume', 'rate', 'pitch' ];
14 for (var i in restrictedFloatAttributes) {
15 var attr = restrictedFloatAttributes[i];
16 var before = utterance[attr];
17 assert_throws(new TypeError, function() { utterance[attr] = NaN; }, attr);
18 assert_throws(new TypeError, function() { utterance[attr] = Infinity; }, att r);
19 assert_equals(utterance[attr], before, 'value is unchanged.');
20 }
21 }, 'SpeechSynthesisUtterance, setting non-finite values.');
22 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/speech/scripted/speechgrammar-basics-expected.txt ('k') | Source/modules/speech/SpeechGrammar.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698