Index: LayoutTests/fast/speech/input-onspeechchange-event.html |
diff --git a/LayoutTests/fast/speech/input-onspeechchange-event.html b/LayoutTests/fast/speech/input-onspeechchange-event.html |
index 8dfb178eb8a352dd62b7590b62c72b78ea222aa7..dd89ed71d379c3a9250cf1caec7782f8b9874ea6 100644 |
--- a/LayoutTests/fast/speech/input-onspeechchange-event.html |
+++ b/LayoutTests/fast/speech/input-onspeechchange-event.html |
@@ -7,15 +7,18 @@ |
<script type="text/javascript"> |
description('Tests for the onspeechchange event with <input type="text" speech>.'); |
-function onSpeechChange() { |
+var results; |
+function onSpeechChange(event) { |
+ results = event.results; |
shouldBeEqualToString('document.getElementById("speechInput").value', 'Green eggs and ham'); |
- shouldEvaluateTo('window.event.results.length', 3); |
- shouldBeEqualToString('window.event.results[0].utterance', 'Green eggs and ham'); |
- shouldEvaluateTo('window.event.results[0].confidence', 0.8); |
- shouldBeEqualToString('window.event.results[1].utterance', 'Green x and ham'); |
- shouldEvaluateTo('window.event.results[1].confidence', 0.5); |
- shouldBeEqualToString('window.event.results[2].utterance', '3 x and am'); |
- shouldEvaluateTo('window.event.results[2].confidence', 0.2); |
+ shouldEvaluateTo('results.length', 3); |
+ shouldBeEqualToString('results[0].utterance', 'Green eggs and ham'); |
+ shouldEvaluateTo('results[0].confidence', 0.8); |
+ shouldBeEqualToString('results[1].utterance', 'Green x and ham'); |
+ shouldEvaluateTo('results[1].confidence', 0.5); |
+ shouldBeEqualToString('results[2].utterance', '3 x and am'); |
+ shouldEvaluateTo('results[2].confidence', 0.2); |
+ shouldBeNull("results.item(-1)"); |
finishJSTest(); |
} |
@@ -39,6 +42,6 @@ window.onload = run; |
window.jsTestIsAsync = true; |
</script> |
<script src="../js/resources/js-test-post.js"></script> |
-<input id='speechInput' x-webkit-speech onwebkitspeechchange="onSpeechChange()"> |
+<input id='speechInput' x-webkit-speech onwebkitspeechchange="onSpeechChange(event)"> |
</body> |
</html> |