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

Unified Diff: chrome/test/live_sync/single_client_live_themes_sync_test.cc

Issue 4732005: [Sync] Added some basic extension sync integration tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed rsimha'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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/live_sync/single_client_live_themes_sync_test.cc
diff --git a/chrome/test/live_sync/single_client_live_themes_sync_test.cc b/chrome/test/live_sync/single_client_live_themes_sync_test.cc
index f8cef03ed6a8265710350def184923caaeb4130d..c32f0e057422e32f8bf37f062e1fb38acd642fa2 100644
--- a/chrome/test/live_sync/single_client_live_themes_sync_test.cc
+++ b/chrome/test/live_sync/single_client_live_themes_sync_test.cc
@@ -23,41 +23,36 @@ class SingleClientLiveThemesSyncTest : public LiveThemesSyncTest {
IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, CustomTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- scoped_refptr<Extension> theme = GetTheme(0);
ASSERT_EQ(NULL, GetCustomTheme(GetProfile(0)));
ASSERT_EQ(NULL, GetCustomTheme(verifier()));
- SetTheme(GetProfile(0), theme);
- SetTheme(verifier(), theme);
- ASSERT_EQ(theme, GetCustomTheme(GetProfile(0)));
- ASSERT_EQ(theme, GetCustomTheme(verifier()));
+ SetTheme(GetProfile(0), GetTheme(0));
+ SetTheme(verifier(), GetTheme(0));
+ ASSERT_EQ(GetTheme(0), GetCustomTheme(GetProfile(0)));
+ ASSERT_EQ(GetTheme(0), GetCustomTheme(verifier()));
- ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
- "Waiting for themes change."));
+ ASSERT_TRUE(AwaitQuiescence());
- ASSERT_EQ(theme, GetCustomTheme(GetProfile(0)));
- ASSERT_EQ(theme, GetCustomTheme(verifier()));
+ ASSERT_EQ(GetTheme(0), GetCustomTheme(GetProfile(0)));
+ ASSERT_EQ(GetTheme(0), GetCustomTheme(verifier()));
}
IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, NativeTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- scoped_refptr<Extension> theme = GetTheme(0);
- SetTheme(GetProfile(0), theme);
- SetTheme(verifier(), theme);
+ SetTheme(GetProfile(0), GetTheme(0));
+ SetTheme(verifier(), GetTheme(0));
ASSERT_FALSE(UsingNativeTheme(GetProfile(0)));
ASSERT_FALSE(UsingNativeTheme(verifier()));
- ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
- "Waiting for themes change."));
+ ASSERT_TRUE(AwaitQuiescence());
GetProfile(0)->SetNativeTheme();
verifier()->SetNativeTheme();
ASSERT_TRUE(UsingNativeTheme(GetProfile(0)));
ASSERT_TRUE(UsingNativeTheme(verifier()));
- ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
- "Waiting for native theme change."));
+ ASSERT_TRUE(AwaitQuiescence());
ASSERT_TRUE(UsingNativeTheme(GetProfile(0)));
ASSERT_TRUE(UsingNativeTheme(verifier()));
@@ -66,22 +61,19 @@ IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, NativeTheme) {
IN_PROC_BROWSER_TEST_F(SingleClientLiveThemesSyncTest, DefaultTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- scoped_refptr<Extension> theme = GetTheme(0);
- SetTheme(GetProfile(0), theme);
- SetTheme(verifier(), theme);
+ SetTheme(GetProfile(0), GetTheme(0));
+ SetTheme(verifier(), GetTheme(0));
ASSERT_FALSE(UsingDefaultTheme(GetProfile(0)));
ASSERT_FALSE(UsingDefaultTheme(verifier()));
- ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
- "Waiting for themes change."));
+ ASSERT_TRUE(AwaitQuiescence());
GetProfile(0)->ClearTheme();
verifier()->ClearTheme();
ASSERT_TRUE(UsingDefaultTheme(GetProfile(0)));
ASSERT_TRUE(UsingDefaultTheme(verifier()));
- ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
- "Waiting for cleared theme change."));
+ ASSERT_TRUE(AwaitQuiescence());
ASSERT_TRUE(UsingDefaultTheme(GetProfile(0)));
ASSERT_TRUE(UsingDefaultTheme(verifier()));

Powered by Google App Engine
This is Rietveld 408576698