OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |