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

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

Issue 2619603002: Remove android_java_ui as it is not used (Closed)
Patch Set: Created 3 years, 11 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> 7 #include <stdint.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/common/features.h" 10 #include "chrome/common/features.h"
11 #include "chrome/test/base/testing_profile.h" 11 #include "chrome/test/base/testing_profile.h"
12 #include "components/rappor/test_rappor_service.h" 12 #include "components/rappor/test_rappor_service.h"
13 #include "components/variations/variations_associated_data.h" 13 #include "components/variations/variations_associated_data.h"
14 #include "content/public/browser/background_sync_parameters.h" 14 #include "content/public/browser/background_sync_parameters.h"
15 #include "content/public/test/test_browser_thread_bundle.h" 15 #include "content/public/test/test_browser_thread_bundle.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 #if BUILDFLAG(ANDROID_JAVA_UI) 19 #if defined(OS_ANDROID)
20 #include "chrome/browser/android/background_sync_launcher_android.h" 20 #include "chrome/browser/android/background_sync_launcher_android.h"
21 #endif 21 #endif
22 22
23 namespace { 23 namespace {
24 24
25 using content::BackgroundSyncController; 25 using content::BackgroundSyncController;
26 26
27 const char kFieldTrialGroup[] = "GroupA"; 27 const char kFieldTrialGroup[] = "GroupA";
28 28
29 class TestBackgroundSyncControllerImpl : public BackgroundSyncControllerImpl { 29 class TestBackgroundSyncControllerImpl : public BackgroundSyncControllerImpl {
(...skipping 15 matching lines...) Expand all
45 DISALLOW_COPY_AND_ASSIGN(TestBackgroundSyncControllerImpl); 45 DISALLOW_COPY_AND_ASSIGN(TestBackgroundSyncControllerImpl);
46 }; 46 };
47 47
48 class BackgroundSyncControllerImplTest : public testing::Test { 48 class BackgroundSyncControllerImplTest : public testing::Test {
49 protected: 49 protected:
50 BackgroundSyncControllerImplTest() 50 BackgroundSyncControllerImplTest()
51 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), 51 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
52 controller_( 52 controller_(
53 new TestBackgroundSyncControllerImpl(&profile_, &rappor_service_)) { 53 new TestBackgroundSyncControllerImpl(&profile_, &rappor_service_)) {
54 ResetFieldTrialList(); 54 ResetFieldTrialList();
55 #if BUILDFLAG(ANDROID_JAVA_UI) 55 #if defined(OS_ANDROID)
56 BackgroundSyncLauncherAndroid::SetPlayServicesVersionCheckDisabledForTests( 56 BackgroundSyncLauncherAndroid::SetPlayServicesVersionCheckDisabledForTests(
57 true); 57 true);
58 #endif 58 #endif
59 } 59 }
60 60
61 void ResetFieldTrialList() { 61 void ResetFieldTrialList() {
62 field_trial_list_.reset( 62 field_trial_list_.reset(
63 new base::FieldTrialList(nullptr /* entropy provider */)); 63 new base::FieldTrialList(nullptr /* entropy provider */));
64 variations::testing::ClearAllVariationParams(); 64 variations::testing::ClearAllVariationParams();
65 base::FieldTrialList::CreateFieldTrial( 65 base::FieldTrialList::CreateFieldTrial(
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 sync_parameters.initial_retry_delay); 157 sync_parameters.initial_retry_delay);
158 EXPECT_EQ(200, sync_parameters.max_sync_attempts); 158 EXPECT_EQ(200, sync_parameters.max_sync_attempts);
159 EXPECT_EQ(300, sync_parameters.retry_delay_factor); 159 EXPECT_EQ(300, sync_parameters.retry_delay_factor);
160 EXPECT_EQ(base::TimeDelta::FromSeconds(400), 160 EXPECT_EQ(base::TimeDelta::FromSeconds(400),
161 sync_parameters.min_sync_recovery_time); 161 sync_parameters.min_sync_recovery_time);
162 EXPECT_EQ(base::TimeDelta::FromSeconds(500), 162 EXPECT_EQ(base::TimeDelta::FromSeconds(500),
163 sync_parameters.max_sync_event_duration); 163 sync_parameters.max_sync_event_duration);
164 } 164 }
165 165
166 } // namespace 166 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698