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

Unified Diff: chrome/browser/sync/test/integration/sync_errors_test.cc

Issue 534733002: Revert "[Sync] Move DataTypeStatusTable ownership into DataTypeManager." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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/browser/sync/test/integration/sync_errors_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_errors_test.cc b/chrome/browser/sync/test/integration/sync_errors_test.cc
index 6fe399fcbc8cb1905bdfd7bc2f5a839a5db368af..48fbf46c2dca195f1bc2090252107be98b6fa9d2 100644
--- a/chrome/browser/sync/test/integration/sync_errors_test.cc
+++ b/chrome/browser/sync/test/integration/sync_errors_test.cc
@@ -37,36 +37,12 @@ class SyncDisabledChecker : public SingleClientStatusChangeChecker {
}
};
-class TypeDisabledChecker : public SingleClientStatusChangeChecker {
- public:
- explicit TypeDisabledChecker(ProfileSyncService* service,
- syncer::ModelType type)
- : SingleClientStatusChangeChecker(service), type_(type) {}
-
- virtual bool IsExitConditionSatisfied() OVERRIDE {
- return !service()->GetActiveDataTypes().Has(type_);
- }
-
- virtual std::string GetDebugMessage() const OVERRIDE {
- return "Type disabled";
- }
- private:
- syncer::ModelType type_;
-};
-
bool AwaitSyncDisabled(ProfileSyncService* service) {
SyncDisabledChecker checker(service);
checker.Wait();
return !checker.TimedOut();
}
-bool AwaitTypeDisabled(ProfileSyncService* service,
- syncer::ModelType type) {
- TypeDisabledChecker checker(service, type);
- checker.Wait();
- return !checker.TimedOut();
-}
-
class SyncErrorTest : public SyncTest {
public:
SyncErrorTest() : SyncTest(SINGLE_CLIENT) {}
@@ -227,9 +203,12 @@ IN_PROC_BROWSER_TEST_F(LegacySyncErrorTest, DisableDatatypeWhileRunning) {
GetProfile(0)->GetPrefs()->SetBoolean(
prefs::kSavingBrowserHistoryDisabled, true);
- // Wait for reconfigurations.
- ASSERT_TRUE(AwaitTypeDisabled(GetSyncService(0), syncer::TYPED_URLS));
- ASSERT_TRUE(AwaitTypeDisabled(GetSyncService(0), syncer::SESSIONS));
+ // Flush any tasks posted by observers of the pref change.
+ base::RunLoop().RunUntilIdle();
+
+ synced_datatypes = GetSyncService((0))->GetActiveDataTypes();
+ ASSERT_FALSE(synced_datatypes.Has(syncer::TYPED_URLS));
+ ASSERT_FALSE(synced_datatypes.Has(syncer::SESSIONS));
const BookmarkNode* node1 = AddFolder(0, 0, "title1");
SetTitle(0, node1, "new_title1");
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698