tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_online_empty_result_handling.html (1523B)


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