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

Side by Side Diff: LayoutTests/fast/speech/scripted/speechrecognition-basics.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script type="text/javascript"> 7 <script type="text/javascript">
8 description('Test basic interaction with the Speech JavaScript API'); 8 description('Test basic interaction with the Speech JavaScript API');
9 9
10 function run() { 10 function run() {
(...skipping 14 matching lines...) Expand all
25 r.onsoundstart = function() { debug('onsoundstart'); shouldBe('count', ' 2'); ++count; } 25 r.onsoundstart = function() { debug('onsoundstart'); shouldBe('count', ' 2'); ++count; }
26 r.onspeechstart = function() { debug('onspeechstart'); shouldBe('count', ' 3'); ++count; } 26 r.onspeechstart = function() { debug('onspeechstart'); shouldBe('count', ' 3'); ++count; }
27 27
28 r.onresult = function() { 28 r.onresult = function() {
29 debug('onresult'); 29 debug('onresult');
30 shouldBe('count', '4'); 30 shouldBe('count', '4');
31 ++count; 31 ++count;
32 shouldBeNull('event.emma'); 32 shouldBeNull('event.emma');
33 shouldBeNull('event.interpretation'); 33 shouldBeNull('event.interpretation');
34 shouldBe('event.results.length', '1'); 34 shouldBe('event.results.length', '1');
35 shouldBeNull('event.results.item(-1)');
35 shouldBe('event.results[0].length', '1'); 36 shouldBe('event.results[0].length', '1');
36 shouldBe('event.results[0].isFinal', 'true'); 37 shouldBe('event.results[0].isFinal', 'true');
37 shouldBeEqualToString('event.results[0].item(0).transcript', 'hello, wor ld'); 38 shouldBeEqualToString('event.results[0].item(0).transcript', 'hello, wor ld');
38 shouldBeCloseTo('event.results[0].item(0).confidence', 0.42, 1e-3); 39 shouldBeCloseTo('event.results[0].item(0).confidence', 0.42, 1e-3);
40 shouldBeNull('event.results[0].item(-1)');
39 } 41 }
40 42
41 r.onspeechend = function() { debug('onspeechend'); shouldBe('count', ' 5'); ++count; } 43 r.onspeechend = function() { debug('onspeechend'); shouldBe('count', ' 5'); ++count; }
42 r.onsoundend = function() { debug('onsoundend'); shouldBe('count', ' 6'); ++count; } 44 r.onsoundend = function() { debug('onsoundend'); shouldBe('count', ' 6'); ++count; }
43 r.onaudioend = function() { debug('onaudioend'); shouldBe('count', ' 7'); ++count; } 45 r.onaudioend = function() { debug('onaudioend'); shouldBe('count', ' 7'); ++count; }
44 46
45 r.onend = function() { 47 r.onend = function() {
46 debug('onend'); 48 debug('onend');
47 shouldBe('count', '8'); 49 shouldBe('count', '8');
48 ++count; 50 ++count;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 87
86 r.start(); 88 r.start();
87 } 89 }
88 90
89 window.onload = run; 91 window.onload = run;
90 window.jsTestIsAsync = true; 92 window.jsTestIsAsync = true;
91 </script> 93 </script>
92 <script src="../../js/resources/js-test-post.js"></script> 94 <script src="../../js/resources/js-test-post.js"></script>
93 </body> 95 </body>
94 </html> 96 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698