| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/translate/translate_prefs.h" | 7 #include "chrome/browser/translate/translate_prefs.h" |
| 8 #include "chrome/browser/sync/test/live_sync/live_sync_test.h" | 8 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 9 #include "chrome/browser/sync/test/live_sync/preferences_helper.h" | 9 #include "chrome/browser/sync/test/integration/preferences_helper.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| 11 | 11 |
| 12 using preferences_helper::AppendStringPref; | 12 using preferences_helper::AppendStringPref; |
| 13 using preferences_helper::BooleanPrefMatches; | 13 using preferences_helper::BooleanPrefMatches; |
| 14 using preferences_helper::ChangeBooleanPref; | 14 using preferences_helper::ChangeBooleanPref; |
| 15 using preferences_helper::ChangeIntegerPref; | 15 using preferences_helper::ChangeIntegerPref; |
| 16 using preferences_helper::ChangeListPref; | 16 using preferences_helper::ChangeListPref; |
| 17 using preferences_helper::ChangeStringPref; | 17 using preferences_helper::ChangeStringPref; |
| 18 using preferences_helper::GetPrefs; | 18 using preferences_helper::GetPrefs; |
| 19 using preferences_helper::IntegerPrefMatches; | 19 using preferences_helper::IntegerPrefMatches; |
| 20 using preferences_helper::ListPrefMatches; | 20 using preferences_helper::ListPrefMatches; |
| 21 using preferences_helper::StringPrefMatches; | 21 using preferences_helper::StringPrefMatches; |
| 22 | 22 |
| 23 class TwoClientPreferencesSyncTest : public LiveSyncTest { | 23 class TwoClientPreferencesSyncTest : public SyncTest { |
| 24 public: | 24 public: |
| 25 TwoClientPreferencesSyncTest() : LiveSyncTest(TWO_CLIENT) {} | 25 TwoClientPreferencesSyncTest() : SyncTest(TWO_CLIENT) {} |
| 26 virtual ~TwoClientPreferencesSyncTest() {} | 26 virtual ~TwoClientPreferencesSyncTest() {} |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 DISALLOW_COPY_AND_ASSIGN(TwoClientPreferencesSyncTest); | 29 DISALLOW_COPY_AND_ASSIGN(TwoClientPreferencesSyncTest); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 // TCM ID - 7306186. | 32 // TCM ID - 7306186. |
| 33 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, | 33 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, |
| 34 kHomePageIsNewTabPage) { | 34 kHomePageIsNewTabPage) { |
| 35 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 35 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 ASSERT_TRUE(IsEncrypted(0, syncable::PREFERENCES)); | 660 ASSERT_TRUE(IsEncrypted(0, syncable::PREFERENCES)); |
| 661 ASSERT_TRUE(IsEncrypted(1, syncable::PREFERENCES)); | 661 ASSERT_TRUE(IsEncrypted(1, syncable::PREFERENCES)); |
| 662 ASSERT_TRUE(BooleanPrefMatches( | 662 ASSERT_TRUE(BooleanPrefMatches( |
| 663 prefs::kHomePageIsNewTabPage)); | 663 prefs::kHomePageIsNewTabPage)); |
| 664 | 664 |
| 665 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); | 665 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); |
| 666 ChangeBooleanPref(0, prefs::kShowHomeButton); | 666 ChangeBooleanPref(0, prefs::kShowHomeButton); |
| 667 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 667 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 668 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); | 668 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); |
| 669 } | 669 } |
| OLD | NEW |