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/test/integration/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
7 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 7 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
8 #include "chrome/browser/sync/test/integration/sync_test.h" | 8 #include "chrome/browser/sync/test/integration/sync_test.h" |
9 #include "chrome/browser/sync/test/integration/themes_helper.h" | 9 #include "chrome/browser/sync/test/integration/themes_helper.h" |
10 | 10 |
11 using themes_helper::AwaitThemeIsPendingInstall; | 11 using themes_helper::AwaitThemeIsPendingInstall; |
12 using themes_helper::AwaitUsingSystemTheme; | 12 using themes_helper::AwaitUsingSystemTheme; |
13 using themes_helper::AwaitUsingDefaultTheme; | 13 using themes_helper::AwaitUsingDefaultTheme; |
14 using themes_helper::GetCustomTheme; | 14 using themes_helper::GetCustomTheme; |
15 using themes_helper::GetThemeID; | 15 using themes_helper::GetThemeID; |
16 using themes_helper::UseCustomTheme; | 16 using themes_helper::UseCustomTheme; |
17 using themes_helper::UseDefaultTheme; | 17 using themes_helper::UseDefaultTheme; |
18 using themes_helper::UseSystemTheme; | 18 using themes_helper::UseSystemTheme; |
19 using themes_helper::UsingCustomTheme; | 19 using themes_helper::UsingCustomTheme; |
20 using themes_helper::UsingDefaultTheme; | 20 using themes_helper::UsingDefaultTheme; |
21 using themes_helper::UsingSystemTheme; | 21 using themes_helper::UsingSystemTheme; |
22 | 22 |
23 class TwoClientThemesSyncTest : public SyncTest { | 23 class TwoClientThemesSyncTest : public SyncTest { |
24 public: | 24 public: |
25 TwoClientThemesSyncTest() : SyncTest(TWO_CLIENT) {} | 25 TwoClientThemesSyncTest() : SyncTest(TWO_CLIENT) {} |
26 virtual ~TwoClientThemesSyncTest() {} | 26 ~TwoClientThemesSyncTest() override {} |
27 | 27 |
28 bool TestUsesSelfNotifications() override { return false; } | 28 bool TestUsesSelfNotifications() override { return false; } |
29 | 29 |
30 private: | 30 private: |
31 DISALLOW_COPY_AND_ASSIGN(TwoClientThemesSyncTest); | 31 DISALLOW_COPY_AND_ASSIGN(TwoClientThemesSyncTest); |
32 }; | 32 }; |
33 | 33 |
34 // Starts with default themes, then sets up sync and uses it to set all | 34 // Starts with default themes, then sets up sync and uses it to set all |
35 // profiles to use a custom theme. Does not actually install any themes, but | 35 // profiles to use a custom theme. Does not actually install any themes, but |
36 // instead verifies the custom theme is pending for install. | 36 // instead verifies the custom theme is pending for install. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 EXPECT_TRUE(UsingDefaultTheme(GetProfile(0))); | 130 EXPECT_TRUE(UsingDefaultTheme(GetProfile(0))); |
131 EXPECT_TRUE(UsingDefaultTheme(GetProfile(1))); | 131 EXPECT_TRUE(UsingDefaultTheme(GetProfile(1))); |
132 EXPECT_TRUE(UsingDefaultTheme(verifier())); | 132 EXPECT_TRUE(UsingDefaultTheme(verifier())); |
133 | 133 |
134 UseCustomTheme(GetProfile(0), 1); | 134 UseCustomTheme(GetProfile(0), 1); |
135 UseCustomTheme(verifier(), 1); | 135 UseCustomTheme(verifier(), 1); |
136 ASSERT_TRUE(AwaitThemeIsPendingInstall(GetProfile(1), GetCustomTheme(1))); | 136 ASSERT_TRUE(AwaitThemeIsPendingInstall(GetProfile(1), GetCustomTheme(1))); |
137 EXPECT_EQ(GetCustomTheme(1), GetThemeID(GetProfile(0))); | 137 EXPECT_EQ(GetCustomTheme(1), GetThemeID(GetProfile(0))); |
138 EXPECT_EQ(GetCustomTheme(1), GetThemeID(verifier())); | 138 EXPECT_EQ(GetCustomTheme(1), GetThemeID(verifier())); |
139 } | 139 } |
OLD | NEW |