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

Side by Side Diff: chrome/browser/background_sync/background_sync_controller_impl_unittest.cc

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
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 "chrome/browser/background_sync/background_sync_controller_impl.h" 5 #include "chrome/browser/background_sync/background_sync_controller_impl.h"
6 6
7 #include <stdint.h>
8
9 #include "base/macros.h"
7 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
8 #include "components/rappor/test_rappor_service.h" 11 #include "components/rappor/test_rappor_service.h"
9 #include "components/variations/variations_associated_data.h" 12 #include "components/variations/variations_associated_data.h"
10 #include "content/public/browser/background_sync_parameters.h" 13 #include "content/public/browser/background_sync_parameters.h"
11 #include "content/public/test/test_browser_thread_bundle.h" 14 #include "content/public/test/test_browser_thread_bundle.h"
12 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
13 #include "url/gurl.h" 16 #include "url/gurl.h"
14 17
15 namespace { 18 namespace {
16 19
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 std::map<std::string, std::string> field_parameters; 120 std::map<std::string, std::string> field_parameters;
118 field_parameters[BackgroundSyncControllerImpl::kDisabledParameterName] = 121 field_parameters[BackgroundSyncControllerImpl::kDisabledParameterName] =
119 "FALSE"; 122 "FALSE";
120 field_parameters[BackgroundSyncControllerImpl::kInitialRetryParameterName] = 123 field_parameters[BackgroundSyncControllerImpl::kInitialRetryParameterName] =
121 "100"; 124 "100";
122 field_parameters[BackgroundSyncControllerImpl::kMaxAttemptsParameterName] = 125 field_parameters[BackgroundSyncControllerImpl::kMaxAttemptsParameterName] =
123 "200"; 126 "200";
124 field_parameters 127 field_parameters
125 [BackgroundSyncControllerImpl::kRetryDelayFactorParameterName] = "300"; 128 [BackgroundSyncControllerImpl::kRetryDelayFactorParameterName] = "300";
126 field_parameters[BackgroundSyncControllerImpl::kMinSyncRecoveryTimeName] = 129 field_parameters[BackgroundSyncControllerImpl::kMinSyncRecoveryTimeName] =
127 "8000000000000"; // something larger than int32. 130 "8000000000000"; // something larger than int32_t.
128 ASSERT_TRUE(variations::AssociateVariationParams( 131 ASSERT_TRUE(variations::AssociateVariationParams(
129 BackgroundSyncControllerImpl::kFieldTrialName, kFieldTrialGroup, 132 BackgroundSyncControllerImpl::kFieldTrialName, kFieldTrialGroup,
130 field_parameters)); 133 field_parameters));
131 134
132 content::BackgroundSyncParameters sync_parameters; 135 content::BackgroundSyncParameters sync_parameters;
133 controller_->GetParameterOverrides(&sync_parameters); 136 controller_->GetParameterOverrides(&sync_parameters);
134 137
135 EXPECT_FALSE(sync_parameters.disable); 138 EXPECT_FALSE(sync_parameters.disable);
136 EXPECT_EQ(base::TimeDelta::FromMinutes(100), 139 EXPECT_EQ(base::TimeDelta::FromMinutes(100),
137 sync_parameters.initial_retry_delay); 140 sync_parameters.initial_retry_delay);
138 EXPECT_EQ(200, sync_parameters.max_sync_attempts); 141 EXPECT_EQ(200, sync_parameters.max_sync_attempts);
139 EXPECT_EQ(300, sync_parameters.retry_delay_factor); 142 EXPECT_EQ(300, sync_parameters.retry_delay_factor);
140 EXPECT_EQ(base::TimeDelta::FromMilliseconds(8000000000000), 143 EXPECT_EQ(base::TimeDelta::FromMilliseconds(8000000000000),
141 sync_parameters.min_sync_recovery_time); 144 sync_parameters.min_sync_recovery_time);
142 } 145 }
143 146
144 } // namespace 147 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/background_sync/background_sync_controller_impl.h ('k') | chrome/browser/banners/app_banner_data_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698