| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <memory> | 5 #include <memory> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 TEST_F(ChromeComponentUpdaterConfiguratorTest, TestFastUpdate) { | 57 TEST_F(ChromeComponentUpdaterConfiguratorTest, TestFastUpdate) { |
| 58 base::CommandLine cmdline(*base::CommandLine::ForCurrentProcess()); | 58 base::CommandLine cmdline(*base::CommandLine::ForCurrentProcess()); |
| 59 cmdline.AppendSwitchASCII(switches::kComponentUpdater, "fast-update"); | 59 cmdline.AppendSwitchASCII(switches::kComponentUpdater, "fast-update"); |
| 60 | 60 |
| 61 const auto config(MakeChromeComponentUpdaterConfigurator(&cmdline, nullptr, | 61 const auto config(MakeChromeComponentUpdaterConfigurator(&cmdline, nullptr, |
| 62 pref_service())); | 62 pref_service())); |
| 63 | 63 |
| 64 CHECK_EQ(10, config->InitialDelay()); | 64 CHECK_EQ(10, config->InitialDelay()); |
| 65 CHECK_EQ(5 * 60 * 60, config->NextCheckDelay()); | 65 CHECK_EQ(5 * 60 * 60, config->NextCheckDelay()); |
| 66 CHECK_EQ(1, config->StepDelay()); | |
| 67 CHECK_EQ(2, config->OnDemandDelay()); | 66 CHECK_EQ(2, config->OnDemandDelay()); |
| 68 CHECK_EQ(10, config->UpdateDelay()); | 67 CHECK_EQ(10, config->UpdateDelay()); |
| 69 } | 68 } |
| 70 | 69 |
| 71 TEST_F(ChromeComponentUpdaterConfiguratorTest, TestOverrideUrl) { | 70 TEST_F(ChromeComponentUpdaterConfiguratorTest, TestOverrideUrl) { |
| 72 const char overrideUrl[] = "http://0.0.0.0/"; | 71 const char overrideUrl[] = "http://0.0.0.0/"; |
| 73 | 72 |
| 74 base::CommandLine cmdline(*base::CommandLine::ForCurrentProcess()); | 73 base::CommandLine cmdline(*base::CommandLine::ForCurrentProcess()); |
| 75 | 74 |
| 76 std::string val = "url-source"; | 75 std::string val = "url-source"; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 TEST_F(ChromeComponentUpdaterConfiguratorTest, TestProdId) { | 176 TEST_F(ChromeComponentUpdaterConfiguratorTest, TestProdId) { |
| 178 base::CommandLine cmdline(*base::CommandLine::ForCurrentProcess()); | 177 base::CommandLine cmdline(*base::CommandLine::ForCurrentProcess()); |
| 179 const auto config(MakeChromeComponentUpdaterConfigurator(&cmdline, nullptr, | 178 const auto config(MakeChromeComponentUpdaterConfigurator(&cmdline, nullptr, |
| 180 pref_service())); | 179 pref_service())); |
| 181 EXPECT_STREQ(update_client::UpdateQueryParams::GetProdIdString( | 180 EXPECT_STREQ(update_client::UpdateQueryParams::GetProdIdString( |
| 182 update_client::UpdateQueryParams::ProdId::CHROME), | 181 update_client::UpdateQueryParams::ProdId::CHROME), |
| 183 config->GetProdId().c_str()); | 182 config->GetProdId().c_str()); |
| 184 } | 183 } |
| 185 | 184 |
| 186 } // namespace component_updater | 185 } // namespace component_updater |
| OLD | NEW |