| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/sync/test/integration/preferences_helper.h" | 10 #include "chrome/browser/sync/test/integration/preferences_helper.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ChangeStringPref(1, prefs::kHomePage, "http://www.google.com/1"); | 70 ChangeStringPref(1, prefs::kHomePage, "http://www.google.com/1"); |
| 71 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); | 71 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); |
| 72 EXPECT_EQ("http://www.google.com/1", GetPrefs(0)->GetString(prefs::kHomePage))
; | 72 EXPECT_EQ("http://www.google.com/1", GetPrefs(0)->GetString(prefs::kHomePage))
; |
| 73 } | 73 } |
| 74 | 74 |
| 75 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, | 75 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, |
| 76 E2E_ENABLED(UnsyncableBooleanPref)) { | 76 E2E_ENABLED(UnsyncableBooleanPref)) { |
| 77 ASSERT_TRUE(SetupSync()); | 77 ASSERT_TRUE(SetupSync()); |
| 78 DisableVerifier(); | 78 DisableVerifier(); |
| 79 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); | 79 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); |
| 80 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kCheckDefaultBrowser)); | 80 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kDisableScreenshots)); |
| 81 | 81 |
| 82 // This pref is not syncable. | 82 // This pref is not syncable. |
| 83 ChangeBooleanPref(0, prefs::kCheckDefaultBrowser); | 83 ChangeBooleanPref(0, prefs::kDisableScreenshots); |
| 84 | 84 |
| 85 // This pref is syncable. | 85 // This pref is syncable. |
| 86 ChangeStringPref(0, prefs::kHomePage, "http://news.google.com"); | 86 ChangeStringPref(0, prefs::kHomePage, "http://news.google.com"); |
| 87 | 87 |
| 88 // Wait until the syncable pref is synced, then expect that the non-syncable | 88 // Wait until the syncable pref is synced, then expect that the non-syncable |
| 89 // one is still out of sync. | 89 // one is still out of sync. |
| 90 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); | 90 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); |
| 91 ASSERT_FALSE(BooleanPrefMatches(prefs::kCheckDefaultBrowser)); | 91 ASSERT_FALSE(BooleanPrefMatches(prefs::kDisableScreenshots)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(StringPref)) { | 94 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(StringPref)) { |
| 95 ASSERT_TRUE(SetupSync()); | 95 ASSERT_TRUE(SetupSync()); |
| 96 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); | 96 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); |
| 97 | 97 |
| 98 ChangeStringPref(0, prefs::kHomePage, "http://news.google.com"); | 98 ChangeStringPref(0, prefs::kHomePage, "http://news.google.com"); |
| 99 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); | 99 ASSERT_TRUE(AwaitStringPrefMatches(prefs::kHomePage)); |
| 100 } | 100 } |
| 101 | 101 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage); | 140 ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage); |
| 141 ASSERT_TRUE(EnableEncryption(0)); | 141 ASSERT_TRUE(EnableEncryption(0)); |
| 142 ASSERT_TRUE(EnableEncryption(1)); | 142 ASSERT_TRUE(EnableEncryption(1)); |
| 143 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kHomePageIsNewTabPage)); | 143 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kHomePageIsNewTabPage)); |
| 144 | 144 |
| 145 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); | 145 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); |
| 146 ChangeBooleanPref(0, prefs::kShowHomeButton); | 146 ChangeBooleanPref(0, prefs::kShowHomeButton); |
| 147 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); | 147 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); |
| 148 } | 148 } |
| OLD | NEW |