| 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/basictypes.h" | 5 #include "base/basictypes.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/sync/test/integration/sync_test.h" | 7 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 8 #include "chrome/browser/sync/test/integration/themes_helper.h" | 8 #include "chrome/browser/sync/test/integration/themes_helper.h" |
| 9 | 9 |
| 10 using themes_helper::GetCustomTheme; | 10 using themes_helper::GetCustomTheme; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // TODO(akalin): Add functions to simulate when a pending extension | 51 // TODO(akalin): Add functions to simulate when a pending extension |
| 52 // is installed as well as when a pending extension fails to | 52 // is installed as well as when a pending extension fails to |
| 53 // install. | 53 // install. |
| 54 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0))); | 54 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0))); |
| 55 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); | 55 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); |
| 56 } | 56 } |
| 57 | 57 |
| 58 // TCM ID - 3599303. | 58 // TCM ID - 3599303. |
| 59 // TODO(sync): Fails on Chrome OS. See http://crbug.com/84575. | 59 // TODO(sync): Fails on Chrome OS. See http://crbug.com/84575. |
| 60 #if defined(OS_CHROMEOS) | 60 #if defined(OS_CHROMEOS) |
| 61 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, FAILS_NativeTheme) { | 61 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DISABLED_NativeTheme) { |
| 62 #else | 62 #else |
| 63 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, NativeTheme) { | 63 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, NativeTheme) { |
| 64 #endif // OS_CHROMEOS | 64 #endif // OS_CHROMEOS |
| 65 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 65 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 66 | 66 |
| 67 UseCustomTheme(GetProfile(0), 0); | 67 UseCustomTheme(GetProfile(0), 0); |
| 68 UseCustomTheme(GetProfile(1), 0); | 68 UseCustomTheme(GetProfile(1), 0); |
| 69 UseCustomTheme(verifier(), 0); | 69 UseCustomTheme(verifier(), 0); |
| 70 | 70 |
| 71 ASSERT_TRUE(AwaitQuiescence()); | 71 ASSERT_TRUE(AwaitQuiescence()); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 100 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 100 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 101 | 101 |
| 102 ASSERT_TRUE(UsingDefaultTheme(GetProfile(0))); | 102 ASSERT_TRUE(UsingDefaultTheme(GetProfile(0))); |
| 103 ASSERT_TRUE(UsingDefaultTheme(GetProfile(1))); | 103 ASSERT_TRUE(UsingDefaultTheme(GetProfile(1))); |
| 104 ASSERT_TRUE(UsingDefaultTheme(verifier())); | 104 ASSERT_TRUE(UsingDefaultTheme(verifier())); |
| 105 } | 105 } |
| 106 | 106 |
| 107 // TCM ID - 7292065. | 107 // TCM ID - 7292065. |
| 108 // TODO(sync): Fails on Chrome OS. See http://crbug.com/84575. | 108 // TODO(sync): Fails on Chrome OS. See http://crbug.com/84575. |
| 109 #if defined(OS_CHROMEOS) | 109 #if defined(OS_CHROMEOS) |
| 110 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, FAILS_NativeDefaultRace) { | 110 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DISABLED_NativeDefaultRace) { |
| 111 #else | 111 #else |
| 112 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, NativeDefaultRace) { | 112 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, NativeDefaultRace) { |
| 113 #endif // OS_CHROMEOS | 113 #endif // OS_CHROMEOS |
| 114 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 114 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 115 | 115 |
| 116 UseNativeTheme(GetProfile(0)); | 116 UseNativeTheme(GetProfile(0)); |
| 117 UseDefaultTheme(GetProfile(1)); | 117 UseDefaultTheme(GetProfile(1)); |
| 118 ASSERT_TRUE(UsingNativeTheme(GetProfile(0))); | 118 ASSERT_TRUE(UsingNativeTheme(GetProfile(0))); |
| 119 ASSERT_TRUE(UsingDefaultTheme(GetProfile(1))); | 119 ASSERT_TRUE(UsingDefaultTheme(GetProfile(1))); |
| 120 | 120 |
| 121 ASSERT_TRUE(AwaitQuiescence()); | 121 ASSERT_TRUE(AwaitQuiescence()); |
| 122 | 122 |
| 123 // TODO(akalin): Add function that compares two profiles to see if | 123 // TODO(akalin): Add function that compares two profiles to see if |
| 124 // they're at the same state. | 124 // they're at the same state. |
| 125 | 125 |
| 126 ASSERT_EQ(UsingNativeTheme(GetProfile(0)), | 126 ASSERT_EQ(UsingNativeTheme(GetProfile(0)), |
| 127 UsingNativeTheme(GetProfile(1))); | 127 UsingNativeTheme(GetProfile(1))); |
| 128 ASSERT_EQ(UsingDefaultTheme(GetProfile(0)), | 128 ASSERT_EQ(UsingDefaultTheme(GetProfile(0)), |
| 129 UsingDefaultTheme(GetProfile(1))); | 129 UsingDefaultTheme(GetProfile(1))); |
| 130 } | 130 } |
| 131 | 131 |
| 132 // TCM ID - 7294077. | 132 // TCM ID - 7294077. |
| 133 // TODO(sync): Fails on Chrome OS. See http://crbug.com/84575. | 133 // TODO(sync): Fails on Chrome OS. See http://crbug.com/84575. |
| 134 #if defined(OS_CHROMEOS) | 134 #if defined(OS_CHROMEOS) |
| 135 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, FAILS_CustomNativeRace) { | 135 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DISABLED_CustomNativeRace) { |
| 136 #else | 136 #else |
| 137 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, CustomNativeRace) { | 137 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, CustomNativeRace) { |
| 138 #endif // OS_CHROMEOS | 138 #endif // OS_CHROMEOS |
| 139 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 139 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 140 | 140 |
| 141 UseCustomTheme(GetProfile(0), 0); | 141 UseCustomTheme(GetProfile(0), 0); |
| 142 UseNativeTheme(GetProfile(1)); | 142 UseNativeTheme(GetProfile(1)); |
| 143 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); | 143 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); |
| 144 ASSERT_TRUE(UsingNativeTheme(GetProfile(1))); | 144 ASSERT_TRUE(UsingNativeTheme(GetProfile(1))); |
| 145 | 145 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); | 236 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); |
| 237 | 237 |
| 238 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); | 238 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); |
| 239 ASSERT_TRUE(AwaitQuiescence()); | 239 ASSERT_TRUE(AwaitQuiescence()); |
| 240 | 240 |
| 241 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); | 241 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); |
| 242 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); | 242 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); |
| 243 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); | 243 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); |
| 244 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0))); | 244 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0))); |
| 245 } | 245 } |
| OLD | NEW |