Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/test/live_sync/single_client_live_themes_sync_test.cc

Issue 4957005: Move themes garbage-collection out of shutdown code. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed asargent's comments Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/test/live_sync/live_themes_sync_test.h" 5 #include "chrome/test/live_sync/live_themes_sync_test.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 9
10 class SingleClientLiveThemesSyncTest : public LiveThemesSyncTest { 10 class SingleClientLiveThemesSyncTest : public LiveThemesSyncTest {
(...skipping 20 matching lines...) Expand all
31 ASSERT_EQ(GetTheme(0), GetCustomTheme(GetProfile(0))); 31 ASSERT_EQ(GetTheme(0), GetCustomTheme(GetProfile(0)));
32 ASSERT_EQ(GetTheme(0), GetCustomTheme(verifier())); 32 ASSERT_EQ(GetTheme(0), GetCustomTheme(verifier()));
33 33
34 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( 34 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
35 "Waiting for custom themes change.")); 35 "Waiting for custom themes change."));
36 36
37 ASSERT_EQ(GetTheme(0), GetCustomTheme(GetProfile(0))); 37 ASSERT_EQ(GetTheme(0), GetCustomTheme(GetProfile(0)));
38 ASSERT_EQ(GetTheme(0), GetCustomTheme(verifier())); 38 ASSERT_EQ(GetTheme(0), GetCustomTheme(verifier()));
39 } 39 }
40 40
41 // TODO(sync): Remove FAILS_ annotation after http://crbug.com/63285 is fixed.
42 #if defined(OS_MACOSX)
43 IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, FAILS_NativeTheme) {
44 #else
45 IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, NativeTheme) { 41 IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, NativeTheme) {
46 #endif
47 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 42 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
48 43
49 SetTheme(GetProfile(0), GetTheme(0)); 44 SetTheme(GetProfile(0), GetTheme(0));
50 SetTheme(verifier(), GetTheme(0)); 45 SetTheme(verifier(), GetTheme(0));
51 ASSERT_FALSE(UsingNativeTheme(GetProfile(0))); 46 ASSERT_FALSE(UsingNativeTheme(GetProfile(0)));
52 ASSERT_FALSE(UsingNativeTheme(verifier())); 47 ASSERT_FALSE(UsingNativeTheme(verifier()));
53 48
54 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( 49 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
55 "Waiting for custom themes change.")); 50 "Waiting for custom themes change."));
56 51
57 GetProfile(0)->SetNativeTheme(); 52 GetProfile(0)->SetNativeTheme();
58 verifier()->SetNativeTheme(); 53 verifier()->SetNativeTheme();
59 ASSERT_TRUE(UsingNativeTheme(GetProfile(0))); 54 ASSERT_TRUE(UsingNativeTheme(GetProfile(0)));
60 ASSERT_TRUE(UsingNativeTheme(verifier())); 55 ASSERT_TRUE(UsingNativeTheme(verifier()));
61 56
62 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( 57 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
63 "Waiting for native themes change.")); 58 "Waiting for native themes change."));
64 59
65 ASSERT_TRUE(UsingNativeTheme(GetProfile(0))); 60 ASSERT_TRUE(UsingNativeTheme(GetProfile(0)));
66 ASSERT_TRUE(UsingNativeTheme(verifier())); 61 ASSERT_TRUE(UsingNativeTheme(verifier()));
67 } 62 }
68 63
69 // TODO(sync): Remove FAILS_ annotation after http://crbug.com/63285 is fixed.
70 #if defined(OS_MACOSX)
71 IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, FAILS_DefaultTheme) {
72 #else
73 IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, DefaultTheme) { 64 IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, DefaultTheme) {
74 #endif
75 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 65 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
76 66
77 SetTheme(GetProfile(0), GetTheme(0)); 67 SetTheme(GetProfile(0), GetTheme(0));
78 SetTheme(verifier(), GetTheme(0)); 68 SetTheme(verifier(), GetTheme(0));
79 ASSERT_FALSE(UsingDefaultTheme(GetProfile(0))); 69 ASSERT_FALSE(UsingDefaultTheme(GetProfile(0)));
80 ASSERT_FALSE(UsingDefaultTheme(verifier())); 70 ASSERT_FALSE(UsingDefaultTheme(verifier()));
81 71
82 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( 72 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
83 "Waiting for custom themes change.")); 73 "Waiting for custom themes change."));
84 74
85 GetProfile(0)->ClearTheme(); 75 GetProfile(0)->ClearTheme();
86 verifier()->ClearTheme(); 76 verifier()->ClearTheme();
87 ASSERT_TRUE(UsingDefaultTheme(GetProfile(0))); 77 ASSERT_TRUE(UsingDefaultTheme(GetProfile(0)));
88 ASSERT_TRUE(UsingDefaultTheme(verifier())); 78 ASSERT_TRUE(UsingDefaultTheme(verifier()));
89 79
90 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( 80 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
91 "Waiting for native themes change.")); 81 "Waiting for native themes change."));
92 82
93 ASSERT_TRUE(UsingDefaultTheme(GetProfile(0))); 83 ASSERT_TRUE(UsingDefaultTheme(GetProfile(0)));
94 ASSERT_TRUE(UsingDefaultTheme(verifier())); 84 ASSERT_TRUE(UsingDefaultTheme(verifier()));
95 } 85 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_provider.cc ('k') | chrome/test/live_sync/two_client_live_themes_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698