OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/values.h" | 5 #include "base/values.h" |
6 #include "chrome/browser/sync/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/profile_sync_service_harness.h" |
7 #include "chrome/browser/sync/test/integration/preferences_helper.h" | 7 #include "chrome/browser/sync/test/integration/preferences_helper.h" |
8 #include "chrome/browser/sync/test/integration/sync_test.h" | 8 #include "chrome/browser/sync/test/integration/sync_test.h" |
9 #include "chrome/browser/translate/translate_prefs.h" | 9 #include "chrome/browser/translate/translate_prefs.h" |
10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 158 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
159 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowBookmarkBar)); | 159 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowBookmarkBar)); |
160 | 160 |
161 ChangeBooleanPref(0, prefs::kShowBookmarkBar); | 161 ChangeBooleanPref(0, prefs::kShowBookmarkBar); |
162 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 162 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
163 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowBookmarkBar)); | 163 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowBookmarkBar)); |
164 } | 164 } |
165 | 165 |
166 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kEnableInstant) { | 166 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kEnableInstant) { |
167 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 167 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
168 ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantConfirmDialogShown)); | |
169 ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantEnabled)); | 168 ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantEnabled)); |
170 | 169 |
171 ChangeBooleanPref(0, prefs::kInstantConfirmDialogShown); | |
172 ChangeBooleanPref(0, prefs::kInstantEnabled); | 170 ChangeBooleanPref(0, prefs::kInstantEnabled); |
173 | 171 |
174 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 172 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
175 ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantConfirmDialogShown)); | |
176 ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantEnabled)); | 173 ASSERT_TRUE(BooleanPrefMatches(prefs::kInstantEnabled)); |
177 } | 174 } |
178 | 175 |
179 // TCM ID - 3611311. | 176 // TCM ID - 3611311. |
180 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kCheckDefaultBrowser) { | 177 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kCheckDefaultBrowser) { |
181 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 178 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
182 DisableVerifier(); | 179 DisableVerifier(); |
183 | 180 |
184 ASSERT_TRUE(BooleanPrefMatches(prefs::kCheckDefaultBrowser)); | 181 ASSERT_TRUE(BooleanPrefMatches(prefs::kCheckDefaultBrowser)); |
185 | 182 |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 610 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
614 ASSERT_TRUE(IsEncrypted(0, syncer::PREFERENCES)); | 611 ASSERT_TRUE(IsEncrypted(0, syncer::PREFERENCES)); |
615 ASSERT_TRUE(IsEncrypted(1, syncer::PREFERENCES)); | 612 ASSERT_TRUE(IsEncrypted(1, syncer::PREFERENCES)); |
616 ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage)); | 613 ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage)); |
617 | 614 |
618 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); | 615 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); |
619 ChangeBooleanPref(0, prefs::kShowHomeButton); | 616 ChangeBooleanPref(0, prefs::kShowHomeButton); |
620 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 617 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
621 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); | 618 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); |
622 } | 619 } |
OLD | NEW |