OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/live_sync/themes_helper.h" | 7 #include "chrome/browser/sync/test/integration/themes_helper.h" |
8 #include "chrome/browser/sync/test/live_sync/live_sync_test.h" | 8 #include "chrome/browser/sync/test/integration/sync_test.h" |
9 | 9 |
10 using themes_helper::GetCustomTheme; | 10 using themes_helper::GetCustomTheme; |
11 using themes_helper::GetThemeID; | 11 using themes_helper::GetThemeID; |
12 using themes_helper::HasOrWillHaveCustomTheme; | 12 using themes_helper::HasOrWillHaveCustomTheme; |
13 using themes_helper::ThemeIsPendingInstall; | 13 using themes_helper::ThemeIsPendingInstall; |
14 using themes_helper::UseCustomTheme; | 14 using themes_helper::UseCustomTheme; |
15 using themes_helper::UseDefaultTheme; | 15 using themes_helper::UseDefaultTheme; |
16 using themes_helper::UseNativeTheme; | 16 using themes_helper::UseNativeTheme; |
17 using themes_helper::UsingCustomTheme; | 17 using themes_helper::UsingCustomTheme; |
18 using themes_helper::UsingDefaultTheme; | 18 using themes_helper::UsingDefaultTheme; |
19 using themes_helper::UsingNativeTheme; | 19 using themes_helper::UsingNativeTheme; |
20 | 20 |
21 class TwoClientThemesSyncTest : public LiveSyncTest { | 21 class TwoClientThemesSyncTest : public SyncTest { |
22 public: | 22 public: |
23 TwoClientThemesSyncTest() : LiveSyncTest(TWO_CLIENT) {} | 23 TwoClientThemesSyncTest() : SyncTest(TWO_CLIENT) {} |
24 virtual ~TwoClientThemesSyncTest() {} | 24 virtual ~TwoClientThemesSyncTest() {} |
25 | 25 |
26 private: | 26 private: |
27 DISALLOW_COPY_AND_ASSIGN(TwoClientThemesSyncTest); | 27 DISALLOW_COPY_AND_ASSIGN(TwoClientThemesSyncTest); |
28 }; | 28 }; |
29 | 29 |
30 // TODO(akalin): Add tests for model association (i.e., tests that | 30 // TODO(akalin): Add tests for model association (i.e., tests that |
31 // start with SetupClients(), change the theme state, then call | 31 // start with SetupClients(), change the theme state, then call |
32 // SetupSync()). | 32 // SetupSync()). |
33 | 33 |
(...skipping 202 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 |