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

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

Issue 394223002: Disable tab syncing when history saving is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 6 years, 4 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 7ef636a57692ef3e80b3e58aed57ce7617a926f7..48fbf46c2dca195f1bc2090252107be98b6fa9d2 100644
--- a/chrome/browser/sync/test/integration/sync_errors_test.cc
+++ b/chrome/browser/sync/test/integration/sync_errors_test.cc
@@ -4,6 +4,7 @@
#include "base/prefs/pref_member.h"
#include "base/prefs/pref_service.h"
+#include "base/run_loop.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/passwords_helper.h"
@@ -193,18 +194,21 @@ IN_PROC_BROWSER_TEST_F(LegacySyncErrorTest,
protocol_error.error_description);
}
-// TODO(lipalani): Fix the typed_url dtc so this test case can pass.
-IN_PROC_BROWSER_TEST_F(LegacySyncErrorTest,
- DISABLED_DisableDatatypeWhileRunning) {
+IN_PROC_BROWSER_TEST_F(LegacySyncErrorTest, DisableDatatypeWhileRunning) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
syncer::ModelTypeSet synced_datatypes =
- GetSyncService((0))->GetPreferredDataTypes();
+ GetSyncService((0))->GetActiveDataTypes();
ASSERT_TRUE(synced_datatypes.Has(syncer::TYPED_URLS));
+ ASSERT_TRUE(synced_datatypes.Has(syncer::SESSIONS));
GetProfile(0)->GetPrefs()->SetBoolean(
prefs::kSavingBrowserHistoryDisabled, true);
- synced_datatypes = GetSyncService((0))->GetPreferredDataTypes();
+ // 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");

Powered by Google App Engine
This is Rietveld 408576698