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

Side by Side Diff: content/browser/speech/speech_input_browsertest.cc

Issue 7989001: Remove use of default request context and fix use of speech censor flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separate overriden methods in profile_impl.h Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 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 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 // SpeechInputManager methods. 54 // SpeechInputManager methods.
55 virtual void StartRecognition(Delegate* delegate, 55 virtual void StartRecognition(Delegate* delegate,
56 int caller_id, 56 int caller_id,
57 int render_process_id, 57 int render_process_id,
58 int render_view_id, 58 int render_view_id,
59 const gfx::Rect& element_rect, 59 const gfx::Rect& element_rect,
60 const std::string& language, 60 const std::string& language,
61 const std::string& grammar, 61 const std::string& grammar,
62 const std::string& origin_url) { 62 const std::string& origin_url,
63 net::URLRequestContextGetter* context_getter,
64 SpeechInputPreferences* speech_input_prefs) {
63 VLOG(1) << "StartRecognition invoked."; 65 VLOG(1) << "StartRecognition invoked.";
64 EXPECT_EQ(0, caller_id_); 66 EXPECT_EQ(0, caller_id_);
65 EXPECT_EQ(NULL, delegate_); 67 EXPECT_EQ(NULL, delegate_);
66 caller_id_ = caller_id; 68 caller_id_ = caller_id;
67 delegate_ = delegate; 69 delegate_ = delegate;
68 grammar_ = grammar; 70 grammar_ = grammar;
69 if (send_fake_response_) { 71 if (send_fake_response_) {
70 // Give the fake result in a short while. 72 // Give the fake result in a short while.
71 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this, 73 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this,
72 &FakeSpeechInputManager::SetFakeRecognitionResult)); 74 &FakeSpeechInputManager::SetFakeRecognitionResult));
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 248
247 // Make the renderer crash. This should trigger SpeechInputDispatcherHost to 249 // Make the renderer crash. This should trigger SpeechInputDispatcherHost to
248 // cancel all pending sessions. 250 // cancel all pending sessions.
249 GURL test_url("about:crash"); 251 GURL test_url("about:crash");
250 ui_test_utils::NavigateToURL(browser(), test_url); 252 ui_test_utils::NavigateToURL(browser(), test_url);
251 253
252 EXPECT_TRUE(fake_speech_input_manager_.did_cancel_all()); 254 EXPECT_TRUE(fake_speech_input_manager_.did_cancel_all());
253 } 255 }
254 256
255 } // namespace speech_input 257 } // namespace speech_input
OLDNEW
« no previous file with comments | « content/browser/renderer_host/browser_render_process_host.cc ('k') | content/browser/speech/speech_input_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698