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

Unified Diff: LayoutTests/fast/speech/input-onspeechchange-event.html

Issue 22208002: Drop [IsIndex] IDL extended attribute from Speech types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Stop using window.event Created 7 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/fast/speech/input-onspeechchange-event-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 &lt;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>
« no previous file with comments | « no previous file | LayoutTests/fast/speech/input-onspeechchange-event-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698