diff options
| author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-02 22:56:01 +0000 |
|---|---|---|
| committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-02 22:56:01 +0000 |
| commit | 4473860ddb85d92fb2fda427f4dabd3415c69c43 (patch) | |
| tree | 7d77e45863b029707bb7b78afe2dd8e8fa5f7add /chrome/browser/sync/notifier | |
| parent | 533e8fe4288e72f87d50479580665b5ec68a8e1b (diff) | |
| download | chromium_src-4473860ddb85d92fb2fda427f4dabd3415c69c43.zip chromium_src-4473860ddb85d92fb2fda427f4dabd3415c69c43.tar.gz chromium_src-4473860ddb85d92fb2fda427f4dabd3415c69c43.tar.bz2 | |
Move TestURLRequestContextGetter to url_request_test_util.{h,cc}
Make everything use this instead of rolling their own.
BUG=113723
TEST=
Review URL: https://chromiumcodereview.appspot.com/9562037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/notifier')
4 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/sync/notifier/DEPS b/chrome/browser/sync/notifier/DEPS index 19b4f38..7376cba 100644 --- a/chrome/browser/sync/notifier/DEPS +++ b/chrome/browser/sync/notifier/DEPS @@ -1,8 +1,6 @@ include_rules = [ "-chrome", - "+chrome/test/base", - "+chrome/browser/sync/notifier", "+chrome/browser/sync/syncable/model_type.h", "+chrome/browser/sync/syncable/model_type_payload_map.h", diff --git a/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc b/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc index 93b123a..64f206c 100644 --- a/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc +++ b/chrome/browser/sync/notifier/invalidation_notifier_unittest.cc @@ -11,12 +11,12 @@ #include "chrome/browser/sync/syncable/model_type.h" #include "chrome/browser/sync/syncable/model_type_payload_map.h" #include "chrome/browser/sync/util/weak_handle.h" -#include "chrome/test/base/test_url_request_context_getter.h" #include "content/test/test_browser_thread.h" #include "jingle/notifier/base/fake_base_task.h" #include "jingle/notifier/base/notifier_options.h" #include "net/base/cert_verifier.h" #include "net/base/host_resolver.h" +#include "net/url_request/url_request_test_util.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -37,7 +37,8 @@ class InvalidationNotifierTest : public testing::Test { notifier::NotifierOptions notifier_options; // Note: URLRequestContextGetters are ref-counted. notifier_options.request_context_getter = - new TestURLRequestContextGetter(); + new TestURLRequestContextGetter( + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); invalidation_notifier_.reset( new InvalidationNotifier( notifier_options, diff --git a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc index c293bdb..a3b8f64 100644 --- a/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc +++ b/chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc @@ -13,9 +13,9 @@ #include "chrome/browser/sync/syncable/model_type.h" #include "chrome/browser/sync/syncable/model_type_payload_map.h" #include "chrome/browser/sync/util/weak_handle.h" -#include "chrome/test/base/test_url_request_context_getter.h" #include "content/test/test_browser_thread.h" #include "jingle/notifier/base/fake_base_task.h" +#include "net/url_request/url_request_test_util.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -37,7 +37,9 @@ class NonBlockingInvalidationNotifierTest : public testing::Test { base::Thread::Options options; options.message_loop_type = MessageLoop::TYPE_IO; io_thread_.StartIOThread(); - request_context_getter_ = new TestURLRequestContextGetter; + request_context_getter_ = + new TestURLRequestContextGetter( + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); notifier::NotifierOptions notifier_options; notifier_options.request_context_getter = request_context_getter_; invalidation_notifier_.reset( diff --git a/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc b/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc index 70783a5..89bf8eb 100644 --- a/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc +++ b/chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc @@ -17,8 +17,8 @@ #include "chrome/browser/sync/syncable/model_type.h" #include "chrome/browser/sync/syncable/model_type_payload_map.h" #include "chrome/common/chrome_switches.h" -#include "chrome/test/base/test_url_request_context_getter.h" #include "content/test/test_browser_thread.h" +#include "net/url_request/url_request_test_util.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -39,7 +39,9 @@ class SyncNotifierFactoryTest : public testing::Test { virtual ~SyncNotifierFactoryTest() {} virtual void SetUp() OVERRIDE { - request_context_getter_ = new TestURLRequestContextGetter; + request_context_getter_ = + new TestURLRequestContextGetter( + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); factory_.reset(new SyncNotifierFactory( "fake_client_info", request_context_getter_, |
