From 8f2d8bddb95c01334a497ee5bff6f16ab02598d0 Mon Sep 17 00:00:00 2001 From: "akalin@chromium.org" Date: Tue, 19 Jun 2012 23:44:05 +0000 Subject: Move test_url_fetcher_factory.* from content/ to net/url_request Also mark URLFetcherImpl as NET_EXPORT_PRIVATE instead of NET_EXPORT, as it shouldn't be used except for some code in test_url_fetcher_factory.*. Update all references. BUG=118220 TEST= TBR=jam@chromium.org,jhawkins@chromium.org,mnissler@chromium.org Review URL: https://chromiumcodereview.appspot.com/10581012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143085 0039d316-1c4b-4281-b951-d872f2087c98 --- .../browser/speech/google_one_shot_remote_engine_unittest.cc | 6 +++--- content/browser/speech/speech_recognizer_impl_unittest.cc | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'content/browser/speech') diff --git a/content/browser/speech/google_one_shot_remote_engine_unittest.cc b/content/browser/speech/google_one_shot_remote_engine_unittest.cc index a393302..2ffae29 100644 --- a/content/browser/speech/google_one_shot_remote_engine_unittest.cc +++ b/content/browser/speech/google_one_shot_remote_engine_unittest.cc @@ -8,7 +8,7 @@ #include "content/browser/speech/google_one_shot_remote_engine.h" #include "content/public/common/speech_recognition_error.h" #include "content/public/common/speech_recognition_result.h" -#include "content/public/test/test_url_fetcher_factory.h" +#include "net/url_request/test_url_fetcher_factory.h" #include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_status.h" #include "testing/gtest/include/gtest/gtest.h" @@ -39,7 +39,7 @@ class GoogleOneShotRemoteEngineTest protected: MessageLoop message_loop_; - TestURLFetcherFactory url_fetcher_factory_; + net::TestURLFetcherFactory url_fetcher_factory_; content::SpeechRecognitionErrorCode error_; content::SpeechRecognitionResult result_; }; @@ -56,7 +56,7 @@ void GoogleOneShotRemoteEngineTest::CreateAndTestRequest( client.StartRecognition(); client.TakeAudioChunk(*dummy_audio_chunk); client.AudioChunksEnded(); - TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); + net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); ASSERT_TRUE(fetcher); fetcher->set_url(fetcher->GetOriginalURL()); diff --git a/content/browser/speech/speech_recognizer_impl_unittest.cc b/content/browser/speech/speech_recognizer_impl_unittest.cc index 542a562..e73a894b 100644 --- a/content/browser/speech/speech_recognizer_impl_unittest.cc +++ b/content/browser/speech/speech_recognizer_impl_unittest.cc @@ -8,12 +8,12 @@ #include "content/browser/speech/google_one_shot_remote_engine.h" #include "content/browser/speech/speech_recognizer_impl.h" #include "content/public/browser/speech_recognition_event_listener.h" -#include "content/public/test/test_url_fetcher_factory.h" #include "media/audio/audio_manager.h" #include "media/audio/fake_audio_input_stream.h" #include "media/audio/fake_audio_output_stream.h" #include "media/audio/test_audio_input_controller_factory.h" #include "net/base/net_errors.h" +#include "net/url_request/test_url_fetcher_factory.h" #include "net/url_request/url_request_status.h" #include "testing/gtest/include/gtest/gtest.h" @@ -235,7 +235,7 @@ class SpeechRecognizerImplTest : public content::SpeechRecognitionEventListener, bool sound_started_; bool sound_ended_; content::SpeechRecognitionErrorCode error_; - TestURLFetcherFactory url_fetcher_factory_; + net::TestURLFetcherFactory url_fetcher_factory_; TestAudioInputControllerFactory audio_input_controller_factory_; std::vector audio_packet_; float volume_; @@ -285,7 +285,7 @@ TEST_F(SpeechRecognizerImplTest, StopWithData) { controller->event_handler()->OnData(controller, &audio_packet_[0], audio_packet_.size()); MessageLoop::current()->RunAllPending(); - TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); + net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); ASSERT_TRUE(fetcher); EXPECT_EQ(i + 1, fetcher->upload_chunks().size()); } @@ -299,7 +299,7 @@ TEST_F(SpeechRecognizerImplTest, StopWithData) { EXPECT_EQ(content::SPEECH_RECOGNITION_ERROR_NONE, error_); // Issue the network callback to complete the process. - TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); + net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); ASSERT_TRUE(fetcher); fetcher->set_url(fetcher->GetOriginalURL()); @@ -348,7 +348,7 @@ TEST_F(SpeechRecognizerImplTest, ConnectionError) { controller->event_handler()->OnData(controller, &audio_packet_[0], audio_packet_.size()); MessageLoop::current()->RunAllPending(); - TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); + net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); ASSERT_TRUE(fetcher); recognizer_->StopAudioCapture(); @@ -386,7 +386,7 @@ TEST_F(SpeechRecognizerImplTest, ServerError) { controller->event_handler()->OnData(controller, &audio_packet_[0], audio_packet_.size()); MessageLoop::current()->RunAllPending(); - TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); + net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); ASSERT_TRUE(fetcher); recognizer_->StopAudioCapture(); -- cgit v1.1