| OLD | NEW |
| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_guld. |
| 205 IN_PROC_BROWSER_TEST_F(SyncErrorTest, ClientDataObsoleteTest) { | 205 // Flaky on Windows and Linux. See crbug.com/683216 |
| 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) { |
| 206 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 212 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 207 | 213 |
| 208 const BookmarkNode* node1 = AddFolder(0, 0, "title1"); | 214 const BookmarkNode* node1 = AddFolder(0, 0, "title1"); |
| 209 SetTitle(0, node1, "new_title1"); | 215 SetTitle(0, node1, "new_title1"); |
| 210 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); | 216 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); |
| 211 | 217 |
| 212 std::string description = "Not My Fault"; | 218 std::string description = "Not My Fault"; |
| 213 std::string url = "www.google.com"; | 219 std::string url = "www.google.com"; |
| 214 | 220 |
| 215 // Remember cache_guid before actionable error. | 221 // Remember cache_guid before actionable error. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 TypeDisabledChecker(GetSyncService(0), syncer::TYPED_URLS).Wait()); | 256 TypeDisabledChecker(GetSyncService(0), syncer::TYPED_URLS).Wait()); |
| 251 ASSERT_TRUE(TypeDisabledChecker(GetSyncService(0), syncer::SESSIONS).Wait()); | 257 ASSERT_TRUE(TypeDisabledChecker(GetSyncService(0), syncer::SESSIONS).Wait()); |
| 252 | 258 |
| 253 const BookmarkNode* node1 = AddFolder(0, 0, "title1"); | 259 const BookmarkNode* node1 = AddFolder(0, 0, "title1"); |
| 254 SetTitle(0, node1, "new_title1"); | 260 SetTitle(0, node1, "new_title1"); |
| 255 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); | 261 ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); |
| 256 // TODO(lipalani): Verify initial sync ended for typed url is false. | 262 // TODO(lipalani): Verify initial sync ended for typed url is false. |
| 257 } | 263 } |
| 258 | 264 |
| 259 } // namespace | 265 } // namespace |
| OLD | NEW |