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

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: 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 component_updater_.reset(ComponentUpdateServiceFactory(test_config_)); 51 component_updater_.reset(ComponentUpdateServiceFactory(test_config_));
52 52
53 net::URLFetcher::SetEnableInterceptionForTests(true); 53 net::URLFetcher::SetEnableInterceptionForTests(true);
54 } 54 }
55 55
56 ComponentUpdaterTest::~ComponentUpdaterTest() { 56 ComponentUpdaterTest::~ComponentUpdaterTest() {
57 net::URLFetcher::SetEnableInterceptionForTests(false); 57 net::URLFetcher::SetEnableInterceptionForTests(false);
58 } 58 }
59 59
60 void ComponentUpdaterTest::SetUp() { 60 void ComponentUpdaterTest::SetUp() {
61 get_interceptor_.reset(new GetInterceptor); 61 get_interceptor_.reset(new GetInterceptor(
62 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
63 BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
64 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
62 interceptor_factory_.reset(new InterceptorFactory); 65 interceptor_factory_.reset(new InterceptorFactory);
63 post_interceptor_ = interceptor_factory_->CreateInterceptor(); 66 post_interceptor_ = interceptor_factory_->CreateInterceptor();
64 EXPECT_TRUE(post_interceptor_); 67 EXPECT_TRUE(post_interceptor_);
65 } 68 }
66 69
67 void ComponentUpdaterTest::TearDown() { 70 void ComponentUpdaterTest::TearDown() {
68 interceptor_factory_.reset(); 71 interceptor_factory_.reset();
69 get_interceptor_.reset(); 72 get_interceptor_.reset();
70 xmlCleanupGlobals(); 73 xmlCleanupGlobals();
71 } 74 }
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 component_updater()->RemoveObserver(&observer2); 1481 component_updater()->RemoveObserver(&observer2);
1479 1482
1480 test_configurator()->SetLoopCount(1); 1483 test_configurator()->SetLoopCount(1);
1481 component_updater()->Start(); 1484 component_updater()->Start();
1482 RunThreads(); 1485 RunThreads();
1483 1486
1484 component_updater()->Stop(); 1487 component_updater()->Stop();
1485 } 1488 }
1486 1489
1487 } // namespace component_updater 1490 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698