OLD | NEW |
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/sync/profile_sync_service_harness.h" | 5 #include "chrome/browser/sync/profile_sync_service_harness.h" |
6 #include "chrome/test/live_sync/bookmarks_helper.h" | 6 #include "chrome/test/live_sync/bookmarks_helper.h" |
7 #include "chrome/test/live_sync/live_sync_test.h" | 7 #include "chrome/test/live_sync/live_sync_test.h" |
8 | 8 |
9 using bookmarks_helper::AddFolder; | 9 using bookmarks_helper::AddFolder; |
10 using bookmarks_helper::SetTitle; | 10 using bookmarks_helper::SetTitle; |
(...skipping 13 matching lines...) Expand all Loading... |
24 const BookmarkNode* node1 = AddFolder(0, 0, L"title1"); | 24 const BookmarkNode* node1 = AddFolder(0, 0, L"title1"); |
25 SetTitle(0, node1, L"new_title1"); | 25 SetTitle(0, node1, L"new_title1"); |
26 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Offline state change.")); | 26 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Offline state change.")); |
27 TriggerBirthdayError(); | 27 TriggerBirthdayError(); |
28 | 28 |
29 // Now make one more change so we will do another sync. | 29 // Now make one more change so we will do another sync. |
30 const BookmarkNode* node2 = AddFolder(0, 0, L"title2"); | 30 const BookmarkNode* node2 = AddFolder(0, 0, L"title2"); |
31 SetTitle(0, node2, L"new_title2"); | 31 SetTitle(0, node2, L"new_title2"); |
32 ASSERT_TRUE(GetClient(0)->AwaitSyncDisabled("Birthday error.")); | 32 ASSERT_TRUE(GetClient(0)->AwaitSyncDisabled("Birthday error.")); |
33 } | 33 } |
| 34 |
| 35 IN_PROC_BROWSER_TEST_F(SyncErrorTest, TransientErrorTest) { |
| 36 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 37 |
| 38 const BookmarkNode* node1 = AddFolder(0, 0, L"title1"); |
| 39 SetTitle(0, node1, L"new_title1"); |
| 40 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Offline state change.")); |
| 41 TriggerTransientError(); |
| 42 |
| 43 // Now make one more change so we will do another sync. |
| 44 const BookmarkNode* node2 = AddFolder(0, 0, L"title2"); |
| 45 SetTitle(0, node2, L"new_title2"); |
| 46 ASSERT_TRUE( |
| 47 GetClient(0)->AwaitExponentialBackoffVerification()); |
| 48 } |
OLD | NEW |