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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-basics.html
diff --git a/LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-basics.html b/LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-basics.html
new file mode 100644
index 0000000000000000000000000000000000000000..3ed5001ff37e147a593d41a10c030c2cadfeb478
--- /dev/null
+++ b/LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-basics.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<title>SpeechSynthesisUtterance: Basic interface tests</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+setup(function() {
+ if (window.internals)
+ window.internals.enableMockSpeechSynthesizer(document);
+});
+
+test(function() {
+ var utterance = new SpeechSynthesisUtterance(" ");
+ var restrictedFloatAttributes = [ 'volume', 'rate', 'pitch' ];
+ for (var i in restrictedFloatAttributes) {
+ var attr = restrictedFloatAttributes[i];
+ var before = utterance[attr];
+ assert_throws(new TypeError, function() { utterance[attr] = NaN; }, attr);
+ assert_throws(new TypeError, function() { utterance[attr] = Infinity; }, attr);
+ assert_equals(utterance[attr], before, 'value is unchanged.');
+ }
+}, 'SpeechSynthesisUtterance, setting non-finite values.');
+</script>
« 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