OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 bool TestConfigurator::InProcess() { return true; } | 103 bool TestConfigurator::InProcess() { return true; } |
104 | 104 |
105 ComponentPatcher* TestConfigurator::CreateComponentPatcher() { | 105 ComponentPatcher* TestConfigurator::CreateComponentPatcher() { |
106 return new MockComponentPatcher(); | 106 return new MockComponentPatcher(); |
107 } | 107 } |
108 | 108 |
109 bool TestConfigurator::DeltasEnabled() const { | 109 bool TestConfigurator::DeltasEnabled() const { |
110 return true; | 110 return true; |
111 } | 111 } |
112 | 112 |
| 113 bool TestConfigurator::UseBackgroundDownloader() const { |
| 114 return false; |
| 115 } |
| 116 |
113 // Set how many update checks are called, the default value is just once. | 117 // Set how many update checks are called, the default value is just once. |
114 void TestConfigurator::SetLoopCount(int times) { times_ = times; } | 118 void TestConfigurator::SetLoopCount(int times) { times_ = times; } |
115 | 119 |
116 void TestConfigurator::SetRecheckTime(int seconds) { | 120 void TestConfigurator::SetRecheckTime(int seconds) { |
117 recheck_time_ = seconds; | 121 recheck_time_ = seconds; |
118 } | 122 } |
119 | 123 |
120 void TestConfigurator::SetOnDemandTime(int seconds) { | 124 void TestConfigurator::SetOnDemandTime(int seconds) { |
121 ondemand_time_ = seconds; | 125 ondemand_time_ = seconds; |
122 } | 126 } |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 | 1277 |
1274 EXPECT_EQ(1, post_interceptor_->GetHitCount()); | 1278 EXPECT_EQ(1, post_interceptor_->GetHitCount()); |
1275 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->error()); | 1279 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->error()); |
1276 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->install_count()); | 1280 EXPECT_EQ(0, static_cast<TestInstaller*>(com.installer)->install_count()); |
1277 | 1281 |
1278 component_updater()->Stop(); | 1282 component_updater()->Stop(); |
1279 } | 1283 } |
1280 | 1284 |
1281 } // namespace component_updater | 1285 } // namespace component_updater |
1282 | 1286 |
OLD | NEW |