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