Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: chrome/test/data/extensions/api_test/speech_input/recognition_error/test.js

Issue 14230005: Remove all code for chrome.experimental.speechInput extension API (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Extension Speech Input api test.
6 // browser_tests --gtest_filter="ExtensionSpeechInputApiTest.*"
7
8 chrome.test.runTests([
9 function testSpeechInputRecognitionError() {
10 // Results should never be provided in this test case.
11 chrome.experimental.speechInput.onResult.addListener(function(event) {
12 chrome.test.fail();
13 });
14
15 // Ensure the recognition error happens.
16 chrome.experimental.speechInput.onError.addListener(function(error) {
17 chrome.test.assertEq(error.code, "networkError");
18
19 // No recording should be happening after an error.
20 chrome.experimental.speechInput.isRecording(function(recording) {
21 chrome.test.assertNoLastError();
22 chrome.test.assertFalse(recording);
23
24 // Stopping should fail since we're in the idle state again.
25 chrome.experimental.speechInput.stop(function() {
26 chrome.test.assertEq(chrome.runtime.lastError.message,
27 "invalidOperation");
28 chrome.test.succeed();
29 });
30 });
31 });
32
33 // Start recording.
34 chrome.experimental.speechInput.start({}, function() {
35 chrome.test.assertNoLastError();
36 });
37 }
38 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698