Title: [92828] trunk/LayoutTests
- Revision
- 92828
- Author
- [email protected]
- Date
- 2011-08-11 01:10:47 -0700 (Thu, 11 Aug 2011)
Log Message
Test how SpeechInputResultList behaves with not enough arguments
https://bugs.webkit.org/show_bug.cgi?id=65812
Reviewed by Sam Weinig.
SpeechInputResultList is only exposed via the x-webkit-speech
attribute, which means there is little compatibility risk in aligning
our too-few-arguments behavior with the specification. There's a
question about whether all these "fake array" objects should work
consistently, but we'll probably want the "fake array" objects we
create in the future to match the spec, so even if we're consistent
now, we'll end up not being consistent in the future.
* fast/speech/speech-input-result-list-not-enough-arguments-expected.txt: Added.
* fast/speech/speech-input-result-list-not-enough-arguments.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (92827 => 92828)
--- trunk/LayoutTests/ChangeLog 2011-08-11 07:56:16 UTC (rev 92827)
+++ trunk/LayoutTests/ChangeLog 2011-08-11 08:10:47 UTC (rev 92828)
@@ -1,3 +1,21 @@
+2011-08-11 Adam Barth <[email protected]>
+
+ Test how SpeechInputResultList behaves with not enough arguments
+ https://bugs.webkit.org/show_bug.cgi?id=65812
+
+ Reviewed by Sam Weinig.
+
+ SpeechInputResultList is only exposed via the x-webkit-speech
+ attribute, which means there is little compatibility risk in aligning
+ our too-few-arguments behavior with the specification. There's a
+ question about whether all these "fake array" objects should work
+ consistently, but we'll probably want the "fake array" objects we
+ create in the future to match the spec, so even if we're consistent
+ now, we'll end up not being consistent in the future.
+
+ * fast/speech/speech-input-result-list-not-enough-arguments-expected.txt: Added.
+ * fast/speech/speech-input-result-list-not-enough-arguments.html: Added.
+
2011-08-10 Ryosuke Niwa <[email protected]>
Skip tests added by r92769 on WebKit2 because TestRunner doesn't support
Added: trunk/LayoutTests/fast/speech/speech-input-result-list-not-enough-arguments-expected.txt (0 => 92828)
--- trunk/LayoutTests/fast/speech/speech-input-result-list-not-enough-arguments-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/speech/speech-input-result-list-not-enough-arguments-expected.txt 2011-08-11 08:10:47 UTC (rev 92828)
@@ -0,0 +1,10 @@
+Tests for SpeechInputResultList' behavior with too few arguments.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.event.results.item() threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/speech/speech-input-result-list-not-enough-arguments.html (0 => 92828)
--- trunk/LayoutTests/fast/speech/speech-input-result-list-not-enough-arguments.html (rev 0)
+++ trunk/LayoutTests/fast/speech/speech-input-result-list-not-enough-arguments.html 2011-08-11 08:10:47 UTC (rev 92828)
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script type="text/_javascript_">
+description('Tests for SpeechInputResultList\' behavior with too few arguments.');
+
+var speechInputCreatedByScript = false;
+
+function onWebkitSpeechChange() {
+ shouldThrow('window.event.results.item()');
+ finishJSTest();
+}
+
+function run() {
+ if (!window.layoutTestController || !window.eventSender)
+ return;
+
+ layoutTestController.addMockSpeechInputResult('Pictures of the moon', 1.0, '');
+ var input = document.getElementById('speechInput');
+ input.addEventListener('webkitspeechchange', onWebkitSpeechChange);
+ var x = input.offsetLeft + input.offsetWidth - 8;
+ var y = input.offsetTop + input.offsetHeight / 2;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
+window._onload_ = run;
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;
+</script>
+<script src=""
+<input id='speechInput' x-webkit-speech>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes