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

Side by Side Diff: chrome/browser/speech/speech_input_extension_apitest.cc

Issue 9663066: Refactoring of chrome speech recognition architecture (CL1.3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compilation issues on windows. Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/speech/speech_input_extension_api.h" 10 #include "chrome/browser/speech/speech_input_extension_api.h"
11 #include "chrome/browser/speech/speech_input_extension_manager.h" 11 #include "chrome/browser/speech/speech_input_extension_manager.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "content/public/browser/speech_recognition_event_listener.h" 15 #include "content/public/browser/speech_recognition_event_listener.h"
16 #include "content/public/common/speech_recognition_error.h"
16 #include "content/public/common/speech_recognition_result.h" 17 #include "content/public/common/speech_recognition_result.h"
17 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
18 19
19 using content::BrowserThread; 20 using content::BrowserThread;
20 21
21 namespace net { 22 namespace net {
22 class URLRequestContextGetter; 23 class URLRequestContextGetter;
23 } 24 }
24 25
25 // Mock class used to test the extension speech input API. 26 // Mock class used to test the extension speech input API.
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 SetRecognitionResult(result); 208 SetRecognitionResult(result);
208 ASSERT_TRUE(RunExtensionTest("speech_input/recognition")) << message_; 209 ASSERT_TRUE(RunExtensionTest("speech_input/recognition")) << message_;
209 } 210 }
210 211
211 IN_PROC_BROWSER_TEST_F(SpeechInputExtensionApiTest, RecognitionError) { 212 IN_PROC_BROWSER_TEST_F(SpeechInputExtensionApiTest, RecognitionError) {
212 AutoManagerHook hook(this); 213 AutoManagerHook hook(this);
213 214
214 SetRecognitionError(content::SPEECH_RECOGNITION_ERROR_NETWORK); 215 SetRecognitionError(content::SPEECH_RECOGNITION_ERROR_NETWORK);
215 ASSERT_TRUE(RunExtensionTest("speech_input/recognition_error")) << message_; 216 ASSERT_TRUE(RunExtensionTest("speech_input/recognition_error")) << message_;
216 } 217 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698