Backed out changeset b462e7b742d8 (bug 1908261) for causing multiple reftest failures...
[gecko.git] / dom / media / webspeech / recognition / test / test_online_400_response.html
blob1a7d0ed452426aecaa9bd94641832839d7cf4b88
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 400 error
7 -->
8 <head>
9 <meta charset="utf-8">
10 <title>Test for Bug 1248897 -- Online speech service</title>
11 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
12 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
13 <script type="application/javascript" src="head.js"></script>
14 </head>
15 <body>
16 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1248897">Mozilla Bug 1248897</a>
17 <p id="display"></p>
18 <div id="content" style="display: none">
20 </div>
21 <pre id="test">
22 <script type="text/javascript">
23 SimpleTest.waitForExplicitFinish();
25 performTest({
26 eventsToRequest: [],
27 expectedEvents: {
28 "start": null,
29 "audiostart": null,
30 "audioend": null,
31 "end": null,
32 'error': buildErrorCallback(errorCodes.NETWORK),
33 "speechstart": null,
34 "speechend": null
36 doneFunc: SimpleTest.finish,
37 prefs: [["media.webspeech.recognition.enable", true],
38 ["media.webspeech.recognition.force_enable", true],
39 ["media.webspeech.service.endpoint",
40 "http://mochi.test:8888/tests/dom/media/webspeech/recognition/test/http_requesthandler.sjs?return400=1"],
41 ["media.webspeech.recognition.timeout", 100000]]
42 });
44 </script>
45 </pre>
46 </body>
47 </html>