Backed out changeset b462e7b742d8 (bug 1908261) for causing multiple reftest failures...
[gecko.git] / dom / media / webspeech / recognition / test / test_online_empty_result_handling.html
blob46f1e7e0cba2c086d4a489584653080a44d111da
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=1248897
5 The intent of this file is to test the speech recognition service behavior
6 whenever the server returns a valid json object, but without any transcription
7 results on it, for example: `{"status":"ok","data":[]}`
8 -->
9 <head>
10 <meta charset="utf-8">
11 <title>Test for Bug 1248897 -- Online speech service</title>
12 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
13 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
14 <script type="application/javascript" src="head.js"></script>
15 </head>
16 <body>
17 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1248897">Mozilla Bug 1248897</a>
18 <p id="display"></p>
19 <div id="content" style="display: none">
21 </div>
22 <pre id="test">
23 <script type="text/javascript">
24 SimpleTest.waitForExplicitFinish();
26 performTest({
27 eventsToRequest: [],
28 expectedEvents: {
29 "start": null,
30 "audiostart": null,
31 "audioend": null,
32 "end": null,
33 'error': buildErrorCallback(errorCodes.NETWORK),
34 "speechstart": null,
35 "speechend": null
37 doneFunc: SimpleTest.finish,
38 prefs: [["media.webspeech.recognition.enable", true],
39 ["media.webspeech.recognition.force_enable", true],
40 ["media.webspeech.service.endpoint",
41 "http://mochi.test:8888/tests/dom/media/webspeech/recognition/test/http_requesthandler.sjs?emptyresult=1"],
42 ["media.webspeech.recognition.timeout", 100000]]
43 });
45 </script>
46 </pre>
47 </body>
48 </html>