OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser.h" | 9 #include "chrome/browser/browser.h" |
10 #include "chrome/browser/renderer_host/render_view_host.h" | 10 #include "chrome/browser/renderer_host/render_view_host.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 std::string grammar() { | 40 std::string grammar() { |
41 return grammar_; | 41 return grammar_; |
42 } | 42 } |
43 | 43 |
44 // SpeechInputManager methods. | 44 // SpeechInputManager methods. |
45 void StartRecognition(Delegate* delegate, | 45 void StartRecognition(Delegate* delegate, |
46 int caller_id, | 46 int caller_id, |
47 int render_process_id, | 47 int render_process_id, |
48 int render_view_id, | 48 int render_view_id, |
49 const gfx::Rect& element_rect, | 49 const gfx::Rect& element_rect, |
| 50 const std::string& language, |
50 const std::string& grammar) { | 51 const std::string& grammar) { |
51 VLOG(1) << "StartRecognition invoked."; | 52 VLOG(1) << "StartRecognition invoked."; |
52 EXPECT_EQ(0, caller_id_); | 53 EXPECT_EQ(0, caller_id_); |
53 EXPECT_EQ(NULL, delegate_); | 54 EXPECT_EQ(NULL, delegate_); |
54 caller_id_ = caller_id; | 55 caller_id_ = caller_id; |
55 delegate_ = delegate; | 56 delegate_ = delegate; |
56 grammar_ = grammar; | 57 grammar_ = grammar; |
57 // Give the fake result in a short while. | 58 // Give the fake result in a short while. |
58 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this, | 59 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this, |
59 &FakeSpeechInputManager::SetFakeRecognitionResult)); | 60 &FakeSpeechInputManager::SetFakeRecognitionResult)); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 #else | 182 #else |
182 #define MAYBE_GrammarAttribute GrammarAttribute | 183 #define MAYBE_GrammarAttribute GrammarAttribute |
183 #endif | 184 #endif |
184 IN_PROC_BROWSER_TEST_F(SpeechInputBrowserTest, MAYBE_GrammarAttribute) { | 185 IN_PROC_BROWSER_TEST_F(SpeechInputBrowserTest, MAYBE_GrammarAttribute) { |
185 LoadAndRunSpeechInputTest(FILE_PATH_LITERAL("grammar_attribute.html")); | 186 LoadAndRunSpeechInputTest(FILE_PATH_LITERAL("grammar_attribute.html")); |
186 EXPECT_EQ("http://example.com/grammar.xml", | 187 EXPECT_EQ("http://example.com/grammar.xml", |
187 fake_speech_input_manager_.grammar()); | 188 fake_speech_input_manager_.grammar()); |
188 } | 189 } |
189 | 190 |
190 } // namespace speech_input | 191 } // namespace speech_input |
OLD | NEW |