| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); | 50 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); |
| 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 // TODO(erg): Fails on linux_aura. See http://crbug.com/304554 | 60 #if defined(OS_CHROMEOS) |
| 61 #if defined(OS_CHROMEOS) || defined(OS_LINUX) | |
| 62 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DISABLED_NativeTheme) { | 61 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DISABLED_NativeTheme) { |
| 63 #else | 62 #else |
| 64 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, NativeTheme) { | 63 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, NativeTheme) { |
| 65 #endif // OS_CHROMEOS | 64 #endif // OS_CHROMEOS |
| 66 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 65 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 67 | 66 |
| 68 UseCustomTheme(GetProfile(0), 0); | 67 UseCustomTheme(GetProfile(0), 0); |
| 69 UseCustomTheme(GetProfile(1), 0); | 68 UseCustomTheme(GetProfile(1), 0); |
| 70 UseCustomTheme(verifier(), 0); | 69 UseCustomTheme(verifier(), 0); |
| 71 | 70 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 100 | 99 |
| 101 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 100 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 102 | 101 |
| 103 ASSERT_TRUE(UsingDefaultTheme(GetProfile(0))); | 102 ASSERT_TRUE(UsingDefaultTheme(GetProfile(0))); |
| 104 ASSERT_TRUE(UsingDefaultTheme(GetProfile(1))); | 103 ASSERT_TRUE(UsingDefaultTheme(GetProfile(1))); |
| 105 ASSERT_TRUE(UsingDefaultTheme(verifier())); | 104 ASSERT_TRUE(UsingDefaultTheme(verifier())); |
| 106 } | 105 } |
| 107 | 106 |
| 108 // TCM ID - 7292065. | 107 // TCM ID - 7292065. |
| 109 // TODO(sync): Fails on Chrome OS. See http://crbug.com/84575. | 108 // TODO(sync): Fails on Chrome OS. See http://crbug.com/84575. |
| 110 // TODO(erg): Fails on linux_aura. See http://crbug.com/304554 | 109 #if defined(OS_CHROMEOS) |
| 111 #if defined(OS_CHROMEOS) || defined(OS_LINUX) | |
| 112 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DISABLED_NativeDefaultRace) { | 110 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DISABLED_NativeDefaultRace) { |
| 113 #else | 111 #else |
| 114 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, NativeDefaultRace) { | 112 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, NativeDefaultRace) { |
| 115 #endif // OS_CHROMEOS | 113 #endif // OS_CHROMEOS |
| 116 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 114 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 117 | 115 |
| 118 UseNativeTheme(GetProfile(0)); | 116 UseNativeTheme(GetProfile(0)); |
| 119 UseDefaultTheme(GetProfile(1)); | 117 UseDefaultTheme(GetProfile(1)); |
| 120 ASSERT_TRUE(UsingNativeTheme(GetProfile(0))); | 118 ASSERT_TRUE(UsingNativeTheme(GetProfile(0))); |
| 121 ASSERT_TRUE(UsingDefaultTheme(GetProfile(1))); | 119 ASSERT_TRUE(UsingDefaultTheme(GetProfile(1))); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); | 236 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); |
| 239 | 237 |
| 240 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); | 238 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); |
| 241 ASSERT_TRUE(AwaitQuiescence()); | 239 ASSERT_TRUE(AwaitQuiescence()); |
| 242 | 240 |
| 243 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); | 241 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); |
| 244 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); | 242 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); |
| 245 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); | 243 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); |
| 246 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0))); | 244 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0))); |
| 247 } | 245 } |
| OLD | NEW |