Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(912)

Unified Diff: components/component_updater/test/component_updater_ping_manager_unittest.cc

Issue 514473002: Componentize component_updater: Break content/ dependency for rest of component_updater tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix lint issues. fix explicits. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/component_updater/test/component_updater_ping_manager_unittest.cc
diff --git a/components/component_updater/test/component_updater_ping_manager_unittest.cc b/components/component_updater/test/component_updater_ping_manager_unittest.cc
index 129adfe347319cec9fcc83a1568094f2fee4cfac..39075c81bede9359d7458a480f8631a51e1a470a 100644
--- a/components/component_updater/test/component_updater_ping_manager_unittest.cc
+++ b/components/component_updater/test/component_updater_ping_manager_unittest.cc
@@ -3,19 +3,16 @@
// found in the LICENSE file.
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/version.h"
#include "components/component_updater/component_updater_ping_manager.h"
#include "components/component_updater/crx_update_item.h"
#include "components/component_updater/test/test_configurator.h"
#include "components/component_updater/test/url_request_post_interceptor.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/test/test_browser_thread_bundle.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-using content::BrowserThread;
-
namespace component_updater {
class ComponentUpdaterPingManagerTest : public testing::Test {
@@ -34,12 +31,12 @@ class ComponentUpdaterPingManagerTest : public testing::Test {
scoped_ptr<PingManager> ping_manager_;
private:
- content::TestBrowserThreadBundle thread_bundle_;
+ base::MessageLoopForIO loop_;
};
ComponentUpdaterPingManagerTest::ComponentUpdaterPingManagerTest()
- : config_(new TestConfigurator),
- thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
+ : config_(new TestConfigurator(base::MessageLoopProxy::current(),
+ base::MessageLoopProxy::current())) {
}
void ComponentUpdaterPingManagerTest::SetUp() {
@@ -57,7 +54,8 @@ void ComponentUpdaterPingManagerTest::RunThreadsUntilIdle() {
// Test is flaky: http://crbug.com/349547
TEST_F(ComponentUpdaterPingManagerTest, DISABLED_PingManagerTest) {
- scoped_ptr<InterceptorFactory> interceptor_factory(new InterceptorFactory);
+ scoped_ptr<InterceptorFactory> interceptor_factory(
+ new InterceptorFactory(base::MessageLoopProxy::current()));
URLRequestPostInterceptor* interceptor =
interceptor_factory->CreateInterceptor();
EXPECT_TRUE(interceptor);
« no previous file with comments | « components/component_updater/test/component_patcher_unittest.cc ('k') | components/component_updater/test/test_configurator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698