| 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/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.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/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, ComplexPrefs) { | 82 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, ComplexPrefs) { |
| 83 ASSERT_TRUE(SetupSync()); | 83 ASSERT_TRUE(SetupSync()); |
| 84 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); | 84 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); |
| 85 ASSERT_TRUE(AwaitListPrefMatches(prefs::kURLsToRestoreOnStartup)); | 85 ASSERT_TRUE(AwaitListPrefMatches(prefs::kURLsToRestoreOnStartup)); |
| 86 | 86 |
| 87 ChangeIntegerPref(0, prefs::kRestoreOnStartup, 0); | 87 ChangeIntegerPref(0, prefs::kRestoreOnStartup, 0); |
| 88 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); | 88 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); |
| 89 | 89 |
| 90 base::ListValue urls; | 90 base::ListValue urls; |
| 91 urls.Append(base::Value::CreateStringValue("http://www.google.com/")); | 91 urls.Append(new base::StringValue("http://www.google.com/")); |
| 92 urls.Append(base::Value::CreateStringValue("http://www.flickr.com/")); | 92 urls.Append(new base::StringValue("http://www.flickr.com/")); |
| 93 ChangeIntegerPref(0, prefs::kRestoreOnStartup, 4); | 93 ChangeIntegerPref(0, prefs::kRestoreOnStartup, 4); |
| 94 ChangeListPref(0, prefs::kURLsToRestoreOnStartup, urls); | 94 ChangeListPref(0, prefs::kURLsToRestoreOnStartup, urls); |
| 95 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); | 95 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); |
| 96 ASSERT_TRUE(AwaitListPrefMatches(prefs::kURLsToRestoreOnStartup)); | 96 ASSERT_TRUE(AwaitListPrefMatches(prefs::kURLsToRestoreOnStartup)); |
| 97 } | 97 } |
| 98 | 98 |
| 99 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, | 99 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, |
| 100 kAutofillAuxiliaryProfilesEnabled) { | 100 kAutofillAuxiliaryProfilesEnabled) { |
| 101 ASSERT_TRUE(SetupSync()); | 101 ASSERT_TRUE(SetupSync()); |
| 102 DisableVerifier(); | 102 DisableVerifier(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage); | 147 ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage); |
| 148 ASSERT_TRUE(EnableEncryption(0)); | 148 ASSERT_TRUE(EnableEncryption(0)); |
| 149 ASSERT_TRUE(EnableEncryption(1)); | 149 ASSERT_TRUE(EnableEncryption(1)); |
| 150 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kHomePageIsNewTabPage)); | 150 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kHomePageIsNewTabPage)); |
| 151 | 151 |
| 152 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); | 152 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); |
| 153 ChangeBooleanPref(0, prefs::kShowHomeButton); | 153 ChangeBooleanPref(0, prefs::kShowHomeButton); |
| 154 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); | 154 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); |
| 155 } | 155 } |
| OLD | NEW |