| 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/chrome_translate_client.h" | 10 #include "chrome/browser/translate/chrome_translate_client.h" |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 kAutofillAuxiliaryProfilesEnabled) { | 383 kAutofillAuxiliaryProfilesEnabled) { |
| 384 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 384 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 385 DisableVerifier(); | 385 DisableVerifier(); |
| 386 | 386 |
| 387 ASSERT_TRUE( | 387 ASSERT_TRUE( |
| 388 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); | 388 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); |
| 389 | 389 |
| 390 ChangeBooleanPref(0, autofill::prefs::kAutofillAuxiliaryProfilesEnabled); | 390 ChangeBooleanPref(0, autofill::prefs::kAutofillAuxiliaryProfilesEnabled); |
| 391 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 391 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 392 | 392 |
| 393 // kAutofillAuxiliaryProfilesEnabled is only synced on Mac. | 393 // kAutofillAuxiliaryProfilesEnabled is only synced on Mac and Android. |
| 394 #if defined(OS_MACOSX) | 394 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 395 ASSERT_TRUE( | 395 ASSERT_TRUE( |
| 396 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); | 396 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); |
| 397 #else | 397 #else |
| 398 ASSERT_FALSE( | 398 ASSERT_FALSE( |
| 399 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); | 399 BooleanPrefMatches(autofill::prefs::kAutofillAuxiliaryProfilesEnabled)); |
| 400 #endif // OS_MACOSX | 400 #endif // defined(OS_MACOSX) || defined(OS_ANDROID) |
| 401 } | 401 } |
| 402 | 402 |
| 403 // TCM ID - 3717298. | 403 // TCM ID - 3717298. |
| 404 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kPromptForDownload) { | 404 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kPromptForDownload) { |
| 405 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 405 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 406 ASSERT_TRUE(BooleanPrefMatches(prefs::kPromptForDownload)); | 406 ASSERT_TRUE(BooleanPrefMatches(prefs::kPromptForDownload)); |
| 407 | 407 |
| 408 ChangeBooleanPref(0, prefs::kPromptForDownload); | 408 ChangeBooleanPref(0, prefs::kPromptForDownload); |
| 409 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 409 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 410 ASSERT_TRUE(BooleanPrefMatches(prefs::kPromptForDownload)); | 410 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))); | 621 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 622 ASSERT_TRUE(IsEncryptionComplete(0)); | 622 ASSERT_TRUE(IsEncryptionComplete(0)); |
| 623 ASSERT_TRUE(IsEncryptionComplete(1)); | 623 ASSERT_TRUE(IsEncryptionComplete(1)); |
| 624 ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage)); | 624 ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage)); |
| 625 | 625 |
| 626 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); | 626 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); |
| 627 ChangeBooleanPref(0, prefs::kShowHomeButton); | 627 ChangeBooleanPref(0, prefs::kShowHomeButton); |
| 628 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 628 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 629 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); | 629 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); |
| 630 } | 630 } |
| OLD | NEW |