| 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/test/integration/preferences_helper.h" | 6 #include "chrome/browser/sync/test/integration/preferences_helper.h" |
| 7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 8 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 8 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
| 9 #include "chrome/browser/sync/test/integration/sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 10 #include "chrome/browser/translate/translate_tab_helper.h" | 10 #include "chrome/browser/translate/translate_tab_helper.h" |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 373 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 374 ASSERT_TRUE(BooleanPrefMatches(prefs::kSafeBrowsingEnabled)); | 374 ASSERT_TRUE(BooleanPrefMatches(prefs::kSafeBrowsingEnabled)); |
| 375 | 375 |
| 376 ChangeBooleanPref(0, prefs::kSafeBrowsingEnabled); | 376 ChangeBooleanPref(0, prefs::kSafeBrowsingEnabled); |
| 377 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 377 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 378 ASSERT_TRUE(BooleanPrefMatches(prefs::kSafeBrowsingEnabled)); | 378 ASSERT_TRUE(BooleanPrefMatches(prefs::kSafeBrowsingEnabled)); |
| 379 } | 379 } |
| 380 | 380 |
| 381 // TCM ID - 3624302. | 381 // TCM ID - 3624302. |
| 382 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, | 382 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, |
| 383 kAutofillAuxiliaryProfilesEnabled) { | 383 kAutofillAndroidAuxiliaryProfilesEnabled) { |
| 384 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 384 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 385 DisableVerifier(); | 385 DisableVerifier(); |
| 386 | 386 |
| 387 ASSERT_TRUE( | 387 ASSERT_TRUE(BooleanPrefMatches( |
| 388 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); | 388 autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled)); |
| 389 | 389 |
| 390 ChangeBooleanPref(0, autofill::prefs::kAutofillAuxiliaryProfilesEnabled); | 390 ChangeBooleanPref(0, |
| 391 autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled); |
| 391 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 392 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 392 | 393 |
| 393 // kAutofillAuxiliaryProfilesEnabled is only synced on Mac. | 394 // kAutofillAndroidAuxiliaryProfilesEnabled is only synced on Android. |
| 394 #if defined(OS_MACOSX) | 395 #if defined(OS_ANDROID) |
| 395 ASSERT_TRUE( | 396 ASSERT_TRUE(BooleanPrefMatches( |
| 396 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); | 397 autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled)); |
| 397 #else | 398 #else |
| 398 ASSERT_FALSE( | 399 ASSERT_FALSE(BooleanPrefMatches( |
| 399 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); | 400 autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled)); |
| 400 #endif // OS_MACOSX | 401 #endif // OS_ANDROID |
| 401 } | 402 } |
| 402 | 403 |
| 403 // TCM ID - 3717298. | 404 // TCM ID - 3717298. |
| 404 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kPromptForDownload) { | 405 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kPromptForDownload) { |
| 405 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 406 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 406 ASSERT_TRUE(BooleanPrefMatches(prefs::kPromptForDownload)); | 407 ASSERT_TRUE(BooleanPrefMatches(prefs::kPromptForDownload)); |
| 407 | 408 |
| 408 ChangeBooleanPref(0, prefs::kPromptForDownload); | 409 ChangeBooleanPref(0, prefs::kPromptForDownload); |
| 409 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 410 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 410 ASSERT_TRUE(BooleanPrefMatches(prefs::kPromptForDownload)); | 411 ASSERT_TRUE(BooleanPrefMatches(prefs::kPromptForDownload)); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 622 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 622 ASSERT_TRUE(IsEncryptionComplete(0)); | 623 ASSERT_TRUE(IsEncryptionComplete(0)); |
| 623 ASSERT_TRUE(IsEncryptionComplete(1)); | 624 ASSERT_TRUE(IsEncryptionComplete(1)); |
| 624 ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage)); | 625 ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage)); |
| 625 | 626 |
| 626 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); | 627 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); |
| 627 ChangeBooleanPref(0, prefs::kShowHomeButton); | 628 ChangeBooleanPref(0, prefs::kShowHomeButton); |
| 628 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 629 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 629 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); | 630 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); |
| 630 } | 631 } |
| OLD | NEW |