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

Side by Side Diff: chrome/test/data/extensions/api_test/speech_input/start_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 testSpeechInputStartError() {
10
11 // Recording is not active, start it.
12 chrome.experimental.speechInput.isRecording(function(recording) {
13 chrome.test.assertNoLastError();
14 chrome.test.assertFalse(recording);
15 chrome.experimental.speechInput.start({}, started);
16 });
17
18 // Start should fail because no devices are available.
19 function started() {
20 chrome.test.assertEq(chrome.runtime.lastError.message,
21 "noRecordingDeviceFound");
22
23 // Recording shouldn't have started.
24 chrome.experimental.speechInput.isRecording(function(recording) {
25 chrome.test.assertNoLastError();
26 chrome.test.assertFalse(recording);
27
28 // Stopping should fail since we're back in the idle state.
29 chrome.experimental.speechInput.stop(function() {
30 chrome.test.assertEq(chrome.runtime.lastError.message,
31 "invalidOperation");
32 chrome.test.succeed();
33 });
34 });
35 }
36 }
37 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698