|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=650295 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 650295 -- Behavior on recognition service error</title> |
|
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
11 <script type="application/javascript" src="head.js"></script> |
|
12 </head> |
|
13 <body> |
|
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=650295">Mozilla Bug 650295</a> |
|
15 <p id="display"></p> |
|
16 <div id="content" style="display: none"> |
|
17 |
|
18 </div> |
|
19 <pre id="test"> |
|
20 <script type="text/javascript"> |
|
21 SimpleTest.waitForExplicitFinish(); |
|
22 |
|
23 performTest({ |
|
24 eventsToRequest: [ |
|
25 'EVENT_START', |
|
26 'EVENT_AUDIO_DATA', |
|
27 'EVENT_RECOGNITIONSERVICE_ERROR' |
|
28 ], |
|
29 expectedEvents: { |
|
30 'start': null, |
|
31 'audiostart': null, |
|
32 'speechstart': null, |
|
33 'speechend': null, |
|
34 'audioend': null, |
|
35 'error': buildErrorCallback(errorCodes.NETWORK), |
|
36 'end': null |
|
37 }, |
|
38 doneFunc: SimpleTest.finish, |
|
39 prefs: [["media.webspeech.test.fake_fsm_events", true], ["media.webspeech.test.fake_recognition_service", true]] |
|
40 }); |
|
41 |
|
42 </script> |
|
43 </pre> |
|
44 </body> |
|
45 </html> |