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

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

Issue 7655055: [Sync] Make BackendMigrator not wait for full sync cycles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/prefs/scoped_user_pref_update.h" 5 #include "chrome/browser/prefs/scoped_user_pref_update.h"
6 #include "chrome/browser/profiles/profile.h" 6 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/sync/profile_sync_service_harness.h" 7 #include "chrome/browser/sync/profile_sync_service_harness.h"
8 #include "chrome/browser/translate/translate_prefs.h" 8 #include "chrome/browser/translate/translate_prefs.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Phase 2: Modify a pref (to trigger migration) and wait for a sync 49 // Phase 2: Modify a pref (to trigger migration) and wait for a sync
50 // cycle. 50 // cycle.
51 // TODO(akalin): Shouldn't need to wait for full sync cycle; see 51 // TODO(akalin): Shouldn't need to wait for full sync cycle; see
52 // 93167. 52 // 93167.
53 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); 53 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton));
54 ChangeBooleanPref(0, prefs::kShowHomeButton); 54 ChangeBooleanPref(0, prefs::kShowHomeButton);
55 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Migration")); 55 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Migration"));
56 } 56 }
57 57
58 // TODO(akalin): Fails due to http://crbug.com/92928. 58 // TODO(akalin): Fails due to http://crbug.com/92928.
59 IN_PROC_BROWSER_TEST_F(MigrationCycleTest, FAILS_PrefsNigori) { 59 IN_PROC_BROWSER_TEST_F(MigrationCycleTest, PrefsNigori) {
60 if (!ServerSupportsErrorTriggering()) { 60 if (!ServerSupportsErrorTriggering()) {
61 LOG(WARNING) << "Test skipped in this server environment."; 61 LOG(WARNING) << "Test skipped in this server environment.";
62 return; 62 return;
63 } 63 }
64 64
65 DisableNotifications(); 65 DisableNotifications();
66 66
67 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 67 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
68 68
69 // Phase 1: Trigger a preference and nigori migration on the server. 69 // Phase 1: Trigger a preference and nigori migration on the server.
(...skipping 11 matching lines...) Expand all
81 // Phase 2: Modify a pref (to trigger migration) and wait for a sync 81 // Phase 2: Modify a pref (to trigger migration) and wait for a sync
82 // cycle. 82 // cycle.
83 // TODO(akalin): Shouldn't need to wait for full sync cycle; see 83 // TODO(akalin): Shouldn't need to wait for full sync cycle; see
84 // 93167. 84 // 93167.
85 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); 85 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton));
86 ChangeBooleanPref(0, prefs::kShowHomeButton); 86 ChangeBooleanPref(0, prefs::kShowHomeButton);
87 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Migration")); 87 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Migration"));
88 } 88 }
89 89
90 // TODO(akalin): Fails due to http://crbug.com/92928. 90 // TODO(akalin): Fails due to http://crbug.com/92928.
91 IN_PROC_BROWSER_TEST_F(MigrationCycleTest, FAILS_BookmarksPrefs) { 91 IN_PROC_BROWSER_TEST_F(MigrationCycleTest, BookmarksPrefs) {
92 if (!ServerSupportsErrorTriggering()) { 92 if (!ServerSupportsErrorTriggering()) {
93 LOG(WARNING) << "Test skipped in this server environment."; 93 LOG(WARNING) << "Test skipped in this server environment.";
94 return; 94 return;
95 } 95 }
96 96
97 DisableNotifications(); 97 DisableNotifications();
98 98
99 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 99 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
100 100
101 // Phase 1: Trigger a bookmark and preference migration on the 101 // Phase 1: Trigger a bookmark and preference migration on the
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // Phase 3: Modify a bookmark and wait for it to sync. 272 // Phase 3: Modify a bookmark and wait for it to sync.
273 ASSERT_TRUE(AddURL(0, IndexedURLTitle(0), GURL(IndexedURL(0))) != NULL); 273 ASSERT_TRUE(AddURL(0, IndexedURLTitle(0), GURL(IndexedURL(0))) != NULL);
274 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 274 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
275 275
276 // Phase 4: Verify that preferences can still be synchronized. 276 // Phase 4: Verify that preferences can still be synchronized.
277 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); 277 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton));
278 ChangeBooleanPref(0, prefs::kShowHomeButton); 278 ChangeBooleanPref(0, prefs::kShowHomeButton);
279 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 279 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
280 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton)); 280 ASSERT_TRUE(BooleanPrefMatches(prefs::kShowHomeButton));
281 } 281 }
OLDNEW
« chrome/browser/sync/backend_migrator.cc ('K') | « chrome/browser/sync/profile_sync_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698