OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <list> | 5 #include <list> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 | 183 |
184 StreamingServerState streaming_server_state_; | 184 StreamingServerState streaming_server_state_; |
185 scoped_ptr<MockGoogleStreamingServer> mock_streaming_server_; | 185 scoped_ptr<MockGoogleStreamingServer> mock_streaming_server_; |
186 media::TestAudioInputControllerFactory test_audio_input_controller_factory_; | 186 media::TestAudioInputControllerFactory test_audio_input_controller_factory_; |
187 }; | 187 }; |
188 | 188 |
189 // Simply loads the test page and checks if it was able to create a Speech | 189 // Simply loads the test page and checks if it was able to create a Speech |
190 // Recognition object in JavaScript, to make sure the Web Speech API is enabled. | 190 // Recognition object in JavaScript, to make sure the Web Speech API is enabled. |
191 // http://crbug.com/396414 | 191 // http://crbug.com/396414 |
192 #if defined(OS_WIN) | 192 #if defined(OS_WIN) || defined(OS_MACOSX) |
193 #define MAYBE_Precheck DISABLED_Precheck | 193 #define MAYBE_Precheck DISABLED_Precheck |
194 #else | 194 #else |
195 #define MAYBE_Precheck Precheck | 195 #define MAYBE_Precheck Precheck |
196 #endif | 196 #endif |
197 IN_PROC_BROWSER_TEST_F(SpeechRecognitionBrowserTest, MAYBE_Precheck) { | 197 IN_PROC_BROWSER_TEST_F(SpeechRecognitionBrowserTest, MAYBE_Precheck) { |
198 NavigateToURLBlockUntilNavigationsComplete( | 198 NavigateToURLBlockUntilNavigationsComplete( |
199 shell(), GetTestUrlFromFragment("precheck"), 2); | 199 shell(), GetTestUrlFromFragment("precheck"), 2); |
200 | 200 |
201 EXPECT_EQ(kIdle, streaming_server_state()); | 201 EXPECT_EQ(kIdle, streaming_server_state()); |
202 EXPECT_EQ("success", GetPageFragment()); | 202 EXPECT_EQ("success", GetPageFragment()); |
203 } | 203 } |
204 | 204 |
205 IN_PROC_BROWSER_TEST_F(SpeechRecognitionBrowserTest, OneShotRecognition) { | 205 IN_PROC_BROWSER_TEST_F(SpeechRecognitionBrowserTest, OneShotRecognition) { |
206 NavigateToURLBlockUntilNavigationsComplete( | 206 NavigateToURLBlockUntilNavigationsComplete( |
207 shell(), GetTestUrlFromFragment("oneshot"), 2); | 207 shell(), GetTestUrlFromFragment("oneshot"), 2); |
208 | 208 |
209 EXPECT_EQ(kClientDisconnected, streaming_server_state()); | 209 EXPECT_EQ(kClientDisconnected, streaming_server_state()); |
210 EXPECT_EQ("goodresult1", GetPageFragment()); | 210 EXPECT_EQ("goodresult1", GetPageFragment()); |
211 } | 211 } |
212 | 212 |
213 } // namespace content | 213 } // namespace content |
OLD | NEW |