| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 return result; | 181 return result; |
| 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 IN_PROC_BROWSER_TEST_F(SpeechRecognitionBrowserTest, Precheck) { | 191 // http://crbug.com/396414 |
| 192 #if defined(OS_WIN) |
| 193 #define MAYBE_Precheck DISABLED_Precheck |
| 194 #else |
| 195 #define MAYBE_Precheck Precheck |
| 196 #endif |
| 197 IN_PROC_BROWSER_TEST_F(SpeechRecognitionBrowserTest, MAYBE_Precheck) { |
| 192 NavigateToURLBlockUntilNavigationsComplete( | 198 NavigateToURLBlockUntilNavigationsComplete( |
| 193 shell(), GetTestUrlFromFragment("precheck"), 2); | 199 shell(), GetTestUrlFromFragment("precheck"), 2); |
| 194 | 200 |
| 195 EXPECT_EQ(kIdle, streaming_server_state()); | 201 EXPECT_EQ(kIdle, streaming_server_state()); |
| 196 EXPECT_EQ("success", GetPageFragment()); | 202 EXPECT_EQ("success", GetPageFragment()); |
| 197 } | 203 } |
| 198 | 204 |
| 199 IN_PROC_BROWSER_TEST_F(SpeechRecognitionBrowserTest, OneShotRecognition) { | 205 IN_PROC_BROWSER_TEST_F(SpeechRecognitionBrowserTest, OneShotRecognition) { |
| 200 NavigateToURLBlockUntilNavigationsComplete( | 206 NavigateToURLBlockUntilNavigationsComplete( |
| 201 shell(), GetTestUrlFromFragment("oneshot"), 2); | 207 shell(), GetTestUrlFromFragment("oneshot"), 2); |
| 202 | 208 |
| 203 EXPECT_EQ(kClientDisconnected, streaming_server_state()); | 209 EXPECT_EQ(kClientDisconnected, streaming_server_state()); |
| 204 EXPECT_EQ("goodresult1", GetPageFragment()); | 210 EXPECT_EQ("goodresult1", GetPageFragment()); |
| 205 } | 211 } |
| 206 | 212 |
| 207 } // namespace content | 213 } // namespace content |
| OLD | NEW |