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

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

Issue 2618613006: Remove ContextClient from DOMWindowSpeechSynthesis (Closed)
Patch Set: temp Created 3 years, 11 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>SpeechSynthesisUtterance: Basic interface tests</title> 2 <title>SpeechSynthesisUtterance: Basic interface tests</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 setup(function() { 6 setup(function() {
7 if (window.internals) 7 if (window.internals)
8 window.internals.enableMockSpeechSynthesizer(document); 8 window.internals.enableMockSpeechSynthesizer(window);
9 }); 9 });
10 10
11 test(function() { 11 test(function() {
12 var utterance = new SpeechSynthesisUtterance(" "); 12 var utterance = new SpeechSynthesisUtterance(" ");
13 var restrictedFloatAttributes = [ 'volume', 'rate', 'pitch' ]; 13 var restrictedFloatAttributes = [ 'volume', 'rate', 'pitch' ];
14 for (var i in restrictedFloatAttributes) { 14 for (var i in restrictedFloatAttributes) {
15 var attr = restrictedFloatAttributes[i]; 15 var attr = restrictedFloatAttributes[i];
16 var before = utterance[attr]; 16 var before = utterance[attr];
17 assert_throws(new TypeError, function() { utterance[attr] = NaN; }, attr); 17 assert_throws(new TypeError, function() { utterance[attr] = NaN; }, attr);
18 assert_throws(new TypeError, function() { utterance[attr] = Infinity; }, att r); 18 assert_throws(new TypeError, function() { utterance[attr] = Infinity; }, att r);
19 assert_equals(utterance[attr], before, 'value is unchanged.'); 19 assert_equals(utterance[attr], before, 'value is unchanged.');
20 } 20 }
21 }, 'SpeechSynthesisUtterance, setting non-finite values.'); 21 }, 'SpeechSynthesisUtterance, setting non-finite values.');
22 </script> 22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698