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

Side by Side Diff: chrome/browser/component_updater/test/component_updater_service_unittest.cc

Issue 508473002: Componentize component_updater: Move URLRequestPrepackagedInterceptor from content/ to net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/browser/component_updater/test/component_updater_service_unitte st.h" 5 #include "chrome/browser/component_updater/test/component_updater_service_unitte st.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 component_updater_.reset(ComponentUpdateServiceFactory(test_config_)); 57 component_updater_.reset(ComponentUpdateServiceFactory(test_config_));
58 58
59 net::URLFetcher::SetEnableInterceptionForTests(true); 59 net::URLFetcher::SetEnableInterceptionForTests(true);
60 } 60 }
61 61
62 ComponentUpdaterTest::~ComponentUpdaterTest() { 62 ComponentUpdaterTest::~ComponentUpdaterTest() {
63 net::URLFetcher::SetEnableInterceptionForTests(false); 63 net::URLFetcher::SetEnableInterceptionForTests(false);
64 } 64 }
65 65
66 void ComponentUpdaterTest::SetUp() { 66 void ComponentUpdaterTest::SetUp() {
67 get_interceptor_.reset(new GetInterceptor); 67 get_interceptor_.reset(new GetInterceptor(
68 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
69 BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
70 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
68 interceptor_factory_.reset(new InterceptorFactory( 71 interceptor_factory_.reset(new InterceptorFactory(
69 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); 72 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
70 post_interceptor_ = interceptor_factory_->CreateInterceptor(); 73 post_interceptor_ = interceptor_factory_->CreateInterceptor();
71 EXPECT_TRUE(post_interceptor_); 74 EXPECT_TRUE(post_interceptor_);
72 } 75 }
73 76
74 void ComponentUpdaterTest::TearDown() { 77 void ComponentUpdaterTest::TearDown() {
75 interceptor_factory_.reset(); 78 interceptor_factory_.reset();
76 get_interceptor_.reset(); 79 get_interceptor_.reset();
77 xmlCleanupGlobals(); 80 xmlCleanupGlobals();
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 component_updater()->RemoveObserver(&observer2); 1488 component_updater()->RemoveObserver(&observer2);
1486 1489
1487 test_configurator()->SetLoopCount(1); 1490 test_configurator()->SetLoopCount(1);
1488 component_updater()->Start(); 1491 component_updater()->Start();
1489 RunThreads(); 1492 RunThreads();
1490 1493
1491 component_updater()->Stop(); 1494 component_updater()->Stop();
1492 } 1495 }
1493 1496
1494 } // namespace component_updater 1497 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698