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

Side by Side Diff: chrome/browser/sync/test/integration/sync_errors_test.cc

Issue 2718533003: [Sync] Adjust types to configure during shutdown (Closed)
Patch Set: Add syncer unittest Created 3 years, 10 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
« no previous file with comments | « no previous file | components/sync/engine_impl/syncer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
9 #include "chrome/browser/sync/test/integration/passwords_helper.h" 9 #include "chrome/browser/sync/test/integration/passwords_helper.h"
10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 ASSERT_TRUE(SyncDisabledChecker(GetSyncService(0)).Wait()); 194 ASSERT_TRUE(SyncDisabledChecker(GetSyncService(0)).Wait());
195 ProfileSyncService::Status status; 195 ProfileSyncService::Status status;
196 GetSyncService(0)->QueryDetailedSyncStatus(&status); 196 GetSyncService(0)->QueryDetailedSyncStatus(&status);
197 ASSERT_EQ(status.sync_protocol_error.error_type, syncer::NOT_MY_BIRTHDAY); 197 ASSERT_EQ(status.sync_protocol_error.error_type, syncer::NOT_MY_BIRTHDAY);
198 ASSERT_EQ(status.sync_protocol_error.action, syncer::DISABLE_SYNC_ON_CLIENT); 198 ASSERT_EQ(status.sync_protocol_error.action, syncer::DISABLE_SYNC_ON_CLIENT);
199 ASSERT_EQ(status.sync_protocol_error.url, url); 199 ASSERT_EQ(status.sync_protocol_error.url, url);
200 ASSERT_EQ(status.sync_protocol_error.error_description, description); 200 ASSERT_EQ(status.sync_protocol_error.error_description, description);
201 } 201 }
202 202
203 // Tests that on receiving CLIENT_DATA_OBSOLETE sync engine gets restarted and 203 // Tests that on receiving CLIENT_DATA_OBSOLETE sync engine gets restarted and
204 // initialized with different cache_guld. 204 // initialized with different cache_guid.
205 // Flaky on Windows and Linux. See crbug.com/683216 205 IN_PROC_BROWSER_TEST_F(SyncErrorTest, ClientDataObsoleteTest) {
206 #if defined(OS_WIN) || defined(OS_LINUX)
207 #define MAYBE_ClientDataObsoleteTest DISABLED_ClientDataObsoleteTest
208 #else
209 #define MAYBE_ClientDataObsoleteTest ClientDataObsoleteTest
210 #endif
211 IN_PROC_BROWSER_TEST_F(SyncErrorTest, MAYBE_ClientDataObsoleteTest) {
212 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 206 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
213 207
214 const BookmarkNode* node1 = AddFolder(0, 0, "title1"); 208 const BookmarkNode* node1 = AddFolder(0, 0, "title1");
215 SetTitle(0, node1, "new_title1"); 209 SetTitle(0, node1, "new_title1");
216 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); 210 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait());
217 211
218 std::string description = "Not My Fault"; 212 std::string description = "Not My Fault";
219 std::string url = "www.google.com"; 213 std::string url = "www.google.com";
220 214
221 // Remember cache_guid before actionable error. 215 // Remember cache_guid before actionable error.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 TypeDisabledChecker(GetSyncService(0), syncer::TYPED_URLS).Wait()); 250 TypeDisabledChecker(GetSyncService(0), syncer::TYPED_URLS).Wait());
257 ASSERT_TRUE(TypeDisabledChecker(GetSyncService(0), syncer::SESSIONS).Wait()); 251 ASSERT_TRUE(TypeDisabledChecker(GetSyncService(0), syncer::SESSIONS).Wait());
258 252
259 const BookmarkNode* node1 = AddFolder(0, 0, "title1"); 253 const BookmarkNode* node1 = AddFolder(0, 0, "title1");
260 SetTitle(0, node1, "new_title1"); 254 SetTitle(0, node1, "new_title1");
261 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); 255 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait());
262 // TODO(lipalani): Verify initial sync ended for typed url is false. 256 // TODO(lipalani): Verify initial sync ended for typed url is false.
263 } 257 }
264 258
265 } // namespace 259 } // namespace
OLDNEW
« no previous file with comments | « no previous file | components/sync/engine_impl/syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698