test_online_hangup.html (1455B)
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 hangups the connection without sending any response 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"> 19 20 </div> 21 <pre id="test"> 22 <script type="text/javascript"> 23 SimpleTest.waitForExplicitFinish(); 24 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 35 }, 36 doneFunc: SimpleTest.finish, 37 prefs: [["media.webspeech.recognition.enable", true], 38 ["media.webspeech.service.endpoint", 39 "http://mochi.test:8888/tests/dom/media/webspeech/recognition/test/http_requesthandler.sjs?hangup=1"], 40 ["media.webspeech.recognition.timeout", 100000]] 41 }); 42 43 </script> 44 </pre> 45 </body> 46 </html>