Index: content/browser/speech/google_streaming_remote_engine_unittest.cc |
diff --git a/content/browser/speech/google_streaming_remote_engine_unittest.cc b/content/browser/speech/google_streaming_remote_engine_unittest.cc |
index 8956d9a43f46dfe90c052d7b9821a5980ccb21b0..3aa91c8b91294221292e8f0e0d8b7dbc027db06b 100644 |
--- a/content/browser/speech/google_streaming_remote_engine_unittest.cc |
+++ b/content/browser/speech/google_streaming_remote_engine_unittest.cc |
@@ -17,24 +17,21 @@ |
#include "net/url_request/url_request_status.h" |
#include "testing/gtest/include/gtest/gtest.h" |
-using content::SpeechRecognitionHypothesis; |
-using content::SpeechRecognitionResult; |
using net::URLRequestStatus; |
using net::TestURLFetcher; |
using net::TestURLFetcherFactory; |
-namespace speech { |
+namespace content { |
// Note: the terms upstream and downstream are from the point-of-view of the |
// client (engine_under_test_). |
-class GoogleStreamingRemoteEngineTest |
- : public SpeechRecognitionEngineDelegate, |
- public testing::Test { |
+class GoogleStreamingRemoteEngineTest : public SpeechRecognitionEngineDelegate, |
+ public testing::Test { |
public: |
GoogleStreamingRemoteEngineTest() |
: last_number_of_upstream_chunks_seen_(0U), |
- error_(content::SPEECH_RECOGNITION_ERROR_NONE) { } |
+ error_(SPEECH_RECOGNITION_ERROR_NONE) { } |
// Creates a speech recognition request and invokes its URL fetcher delegate |
// with the given test data. |
@@ -46,7 +43,7 @@ class GoogleStreamingRemoteEngineTest |
results_.push(result); |
} |
virtual void OnSpeechRecognitionEngineError( |
- const content::SpeechRecognitionError& error) OVERRIDE { |
+ const SpeechRecognitionError& error) OVERRIDE { |
error_ = error.code; |
} |
@@ -84,7 +81,7 @@ class GoogleStreamingRemoteEngineTest |
size_t last_number_of_upstream_chunks_seen_; |
MessageLoop message_loop_; |
std::string response_buffer_; |
- content::SpeechRecognitionErrorCode error_; |
+ SpeechRecognitionErrorCode error_; |
std::queue<SpeechRecognitionResult> results_; |
}; |
@@ -122,7 +119,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, SingleDefinitiveResult) { |
CloseMockDownstream(DOWNSTREAM_ERROR_NONE); |
ASSERT_FALSE(engine_under_test_->IsRecognitionPending()); |
EndMockRecognition(); |
- ASSERT_EQ(content::SPEECH_RECOGNITION_ERROR_NONE, error_); |
+ ASSERT_EQ(SPEECH_RECOGNITION_ERROR_NONE, error_); |
ASSERT_EQ(0U, results_.size()); |
} |
@@ -164,7 +161,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, SeveralStreamingResults) { |
CloseMockDownstream(DOWNSTREAM_ERROR_NONE); |
ASSERT_FALSE(engine_under_test_->IsRecognitionPending()); |
EndMockRecognition(); |
- ASSERT_EQ(content::SPEECH_RECOGNITION_ERROR_NONE, error_); |
+ ASSERT_EQ(SPEECH_RECOGNITION_ERROR_NONE, error_); |
ASSERT_EQ(0U, results_.size()); |
} |
@@ -199,7 +196,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, NoFinalResultAfterAudioChunksEnded) { |
// Ensure everything is closed cleanly after the downstream is closed. |
ASSERT_FALSE(engine_under_test_->IsRecognitionPending()); |
EndMockRecognition(); |
- ASSERT_EQ(content::SPEECH_RECOGNITION_ERROR_NONE, error_); |
+ ASSERT_EQ(SPEECH_RECOGNITION_ERROR_NONE, error_); |
ASSERT_EQ(0U, results_.size()); |
} |
@@ -246,7 +243,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, HTTPError) { |
// Expect a SPEECH_RECOGNITION_ERROR_NETWORK error to be raised. |
ASSERT_FALSE(engine_under_test_->IsRecognitionPending()); |
EndMockRecognition(); |
- ASSERT_EQ(content::SPEECH_RECOGNITION_ERROR_NETWORK, error_); |
+ ASSERT_EQ(SPEECH_RECOGNITION_ERROR_NETWORK, error_); |
ASSERT_EQ(0U, results_.size()); |
} |
@@ -264,7 +261,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, NetworkError) { |
// Expect a SPEECH_RECOGNITION_ERROR_NETWORK error to be raised. |
ASSERT_FALSE(engine_under_test_->IsRecognitionPending()); |
EndMockRecognition(); |
- ASSERT_EQ(content::SPEECH_RECOGNITION_ERROR_NETWORK, error_); |
+ ASSERT_EQ(SPEECH_RECOGNITION_ERROR_NETWORK, error_); |
ASSERT_EQ(0U, results_.size()); |
} |
@@ -309,7 +306,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, Stability) { |
// Since there was no final result, we get an empty "no match" result. |
SpeechRecognitionResult empty_result; |
ExpectResultReceived(empty_result); |
- ASSERT_EQ(content::SPEECH_RECOGNITION_ERROR_NONE, error_); |
+ ASSERT_EQ(SPEECH_RECOGNITION_ERROR_NONE, error_); |
ASSERT_EQ(0U, results_.size()); |
} |
@@ -483,4 +480,4 @@ std::string GoogleStreamingRemoteEngineTest::ToBigEndian32(uint32 value) { |
return std::string(raw_data, sizeof(raw_data)); |
} |
-} // namespace speech |
+} // namespace content |