| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/component_updater/configurator_impl.h" | 9 #include "components/component_updater/configurator_impl.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 37 CHECK_EQ(6 * kDelayOneMinute, config->InitialDelay()); | 37 CHECK_EQ(6 * kDelayOneMinute, config->InitialDelay()); |
| 38 CHECK_EQ(6 * kDelayOneHour, config->NextCheckDelay()); | 38 CHECK_EQ(6 * kDelayOneHour, config->NextCheckDelay()); |
| 39 CHECK_EQ(1, config->StepDelay()); | 39 CHECK_EQ(1, config->StepDelay()); |
| 40 CHECK_EQ(30 * kDelayOneMinute, config->OnDemandDelay()); | 40 CHECK_EQ(30 * kDelayOneMinute, config->OnDemandDelay()); |
| 41 CHECK_EQ(15 * kDelayOneMinute, config->UpdateDelay()); | 41 CHECK_EQ(15 * kDelayOneMinute, config->UpdateDelay()); |
| 42 | 42 |
| 43 // Test the fast-update timings. | 43 // Test the fast-update timings. |
| 44 cmdline.AppendSwitchASCII("--component-updater", "fast-update"); | 44 cmdline.AppendSwitchASCII("--component-updater", "fast-update"); |
| 45 config.reset(new ConfiguratorImpl(&cmdline, nullptr, false)); | 45 config.reset(new ConfiguratorImpl(&cmdline, nullptr, false)); |
| 46 CHECK_EQ(10, config->InitialDelay()); | 46 CHECK_EQ(10, config->InitialDelay()); |
| 47 CHECK_EQ(kDelayOneMinute, config->NextCheckDelay()); | 47 CHECK_EQ(6 * kDelayOneHour, config->NextCheckDelay()); |
| 48 CHECK_EQ(1, config->StepDelay()); | 48 CHECK_EQ(1, config->StepDelay()); |
| 49 CHECK_EQ(2, config->OnDemandDelay()); | 49 CHECK_EQ(2, config->OnDemandDelay()); |
| 50 CHECK_EQ(10, config->UpdateDelay()); | 50 CHECK_EQ(10, config->UpdateDelay()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace component_updater | 53 } // namespace component_updater |
| OLD | NEW |