1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/media/webspeech/recognition/test/test_recognition_service_error.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=650295 1.8 +--> 1.9 +<head> 1.10 + <meta charset="utf-8"> 1.11 + <title>Test for Bug 650295 -- Behavior on recognition service error</title> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 + <script type="application/javascript" src="head.js"></script> 1.15 +</head> 1.16 +<body> 1.17 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=650295">Mozilla Bug 650295</a> 1.18 +<p id="display"></p> 1.19 +<div id="content" style="display: none"> 1.20 + 1.21 +</div> 1.22 +<pre id="test"> 1.23 +<script type="text/javascript"> 1.24 + SimpleTest.waitForExplicitFinish(); 1.25 + 1.26 + performTest({ 1.27 + eventsToRequest: [ 1.28 + 'EVENT_START', 1.29 + 'EVENT_AUDIO_DATA', 1.30 + 'EVENT_RECOGNITIONSERVICE_ERROR' 1.31 + ], 1.32 + expectedEvents: { 1.33 + 'start': null, 1.34 + 'audiostart': null, 1.35 + 'speechstart': null, 1.36 + 'speechend': null, 1.37 + 'audioend': null, 1.38 + 'error': buildErrorCallback(errorCodes.NETWORK), 1.39 + 'end': null 1.40 + }, 1.41 + doneFunc: SimpleTest.finish, 1.42 + prefs: [["media.webspeech.test.fake_fsm_events", true], ["media.webspeech.test.fake_recognition_service", true]] 1.43 + }); 1.44 + 1.45 +</script> 1.46 +</pre> 1.47 +</body> 1.48 +</html>