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

Side by Side Diff: components/component_updater/configurator_impl_unittest.cc

Issue 2179593003: fast-update flag only accelerates the first component update check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fast-update
Patch Set: Created 4 years, 5 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
« no previous file with comments | « components/component_updater/configurator_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/component_updater/configurator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698