OLD | NEW |
1 Tests the basics of SpeechGrammar and SpeechGrammarList | 1 Tests the basics of SpeechGrammar and SpeechGrammarList |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 PASS 'webkitSpeechGrammar' in window is true | 6 PASS 'webkitSpeechGrammar' in window is true |
7 PASS webkitSpeechGrammar == null is false | 7 PASS webkitSpeechGrammar == null is false |
8 PASS 'webkitSpeechGrammarList' in window is true | 8 PASS 'webkitSpeechGrammarList' in window is true |
9 PASS webkitSpeechGrammarList == null is false | 9 PASS webkitSpeechGrammarList == null is false |
10 window.g = new webkitSpeechGrammar() | 10 window.g = new webkitSpeechGrammar() |
11 PASS g == null is false | 11 PASS g == null is false |
12 PASS g.weight is 1.0 | 12 PASS g.weight is 1.0 |
13 PASS g.src is '' | 13 PASS g.src is '' |
14 g.weight = 2 | 14 g.weight = 2 |
15 PASS g.weight is 2.0 | 15 PASS g.weight is 2.0 |
16 g.src = 'grammar.xml' | 16 g.src = 'grammar.xml' |
17 PASS g.src is base + 'grammar.xml' | 17 PASS g.src is base + 'grammar.xml' |
18 g.src = 'http://example.tld/grammar.xml' | 18 g.src = 'http://example.tld/grammar.xml' |
19 PASS g.src is 'http://example.tld/grammar.xml' | 19 PASS g.src is 'http://example.tld/grammar.xml' |
20 g.src = 'foo bar' | 20 g.src = 'foo bar' |
21 PASS g.src is base + 'foo%20bar' | 21 PASS g.src is base + 'foo%20bar' |
22 window.gs = new webkitSpeechGrammarList() | 22 window.gs = new webkitSpeechGrammarList() |
23 PASS gs == null is false | 23 PASS gs == null is false |
24 PASS gs.length is 0 | 24 PASS gs.length is 0 |
25 PASS gs.item(0) == null is true | 25 PASS gs.item(0) == null is true |
26 PASS gs[0] == undefined is true | 26 PASS gs[0] == undefined is true |
27 PASS gs.item(-1) threw exception IndexSizeError: Index or size was negative, or
greater than the allowed value.. | 27 PASS gs.item(-1) is null |
28 PASS gs[-1] == undefined is true | 28 PASS gs[-1] == undefined is true |
29 gs.addFromUri('grammar', 2) | 29 gs.addFromUri('grammar', 2) |
30 PASS gs.length is 1 | 30 PASS gs.length is 1 |
31 PASS gs.item(1) == null is true | 31 PASS gs.item(1) == null is true |
32 PASS gs[1] == undefined is true | 32 PASS gs[1] == undefined is true |
33 PASS gs.item(-1) threw exception IndexSizeError: Index or size was negative, or
greater than the allowed value.. | 33 PASS gs.item(-1) is null |
34 PASS gs[-1] == undefined is true | 34 PASS gs[-1] == undefined is true |
35 PASS gs[0] is gs.item(0) | 35 PASS gs[0] is gs.item(0) |
36 PASS gs.item(0).src is base + 'grammar' | 36 PASS gs.item(0).src is base + 'grammar' |
37 PASS gs.item(0).weight is 2 | 37 PASS gs.item(0).weight is 2 |
38 gs.addFromUri('http://foo.tld/grammar.xml', 3) | 38 gs.addFromUri('http://foo.tld/grammar.xml', 3) |
39 PASS gs.length is 2 | 39 PASS gs.length is 2 |
40 PASS gs[1] is gs.item(1) | 40 PASS gs[1] is gs.item(1) |
41 PASS gs.item(1).src is 'http://foo.tld/grammar.xml' | 41 PASS gs.item(1).src is 'http://foo.tld/grammar.xml' |
42 PASS gs.item(1).weight is 3 | 42 PASS gs.item(1).weight is 3 |
43 gs.addFromString('foo', 4) | 43 gs.addFromString('foo', 4) |
44 PASS gs.length is 3 | 44 PASS gs.length is 3 |
45 PASS gs[2] is gs.item(2) | 45 PASS gs[2] is gs.item(2) |
46 PASS gs.item(2).src is 'data:application/xml,%3Cgrammar%3Efoo%3C/grammar%3E' | 46 PASS gs.item(2).src is 'data:application/xml,%3Cgrammar%3Efoo%3C/grammar%3E' |
47 PASS gs.item(2).weight is 4 | 47 PASS gs.item(2).weight is 4 |
48 PASS gs[2].src is 'data:application/xml,%3Cgrammar%3Efoo%3C/grammar%3E' | 48 PASS gs[2].src is 'data:application/xml,%3Cgrammar%3Efoo%3C/grammar%3E' |
49 PASS gs[2].weight is 4 | 49 PASS gs[2].weight is 4 |
50 PASS successfullyParsed is true | 50 PASS successfullyParsed is true |
51 | 51 |
52 TEST COMPLETE | 52 TEST COMPLETE |
53 | 53 |
OLD | NEW |