OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/test/live_sync/live_bookmarks_sync_test.h" | 5 #include "chrome/test/live_sync/live_bookmarks_sync_test.h" |
6 | 6 |
| 7 // TODO(rsimha): Debug the flakiness of this with fred. http://crbug.com/53858 |
| 8 IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, |
| 9 FAILS_OfflineToOnline) { |
| 10 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 11 |
| 12 DisableNetwork(GetProfile(0)); |
| 13 |
| 14 BookmarkModel* bm = GetBookmarkModel(0); |
| 15 BookmarkModelVerifier* v = verifier_helper(); |
| 16 |
| 17 const BookmarkNode* top = v->AddGroup(bm, bm->other_node(), 0, L"top"); |
| 18 v->SetTitle(bm, top, L"title"); |
| 19 |
| 20 |
| 21 EXPECT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Offline state change.")); |
| 22 { |
| 23 ProfileSyncService::Status status( |
| 24 GetClient(0)->service()->QueryDetailedSyncStatus()); |
| 25 EXPECT_EQ(status.summary, ProfileSyncService::Status::OFFLINE_UNSYNCED); |
| 26 } |
| 27 |
| 28 EnableNetwork(GetProfile(0)); |
| 29 { |
| 30 EXPECT_TRUE(GetClient(0)->AwaitSyncCycleCompletion("Commit changes.")); |
| 31 ProfileSyncService::Status status( |
| 32 GetClient(0)->service()->QueryDetailedSyncStatus()); |
| 33 EXPECT_EQ(status.summary, ProfileSyncService::Status::READY); |
| 34 v->ExpectMatch(bm); |
| 35 } |
| 36 } |
| 37 |
7 IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, Sanity) { | 38 IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, Sanity) { |
8 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; | 39 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; |
9 BookmarkModel* bm = GetBookmarkModel(0); | 40 BookmarkModel* bm = GetBookmarkModel(0); |
10 BookmarkModelVerifier* v = verifier_helper(); | 41 BookmarkModelVerifier* v = verifier_helper(); |
11 | 42 |
12 // Starting state: | 43 // Starting state: |
13 // other_node | 44 // other_node |
14 // -> top | 45 // -> top |
15 // -> tier1_a | 46 // -> tier1_a |
16 // -> http://mail.google.com "tier1_a_url0" | 47 // -> http://mail.google.com "tier1_a_url0" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // 'Bookmarks' file. This is mostly useful to verify server state. | 148 // 'Bookmarks' file. This is mostly useful to verify server state. |
118 // DISABLED because it should be; we use this as a utility more than a test. | 149 // DISABLED because it should be; we use this as a utility more than a test. |
119 IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, DISABLED_GetUpdates) { | 150 IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, DISABLED_GetUpdates) { |
120 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 151 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
121 | 152 |
122 EXPECT_TRUE(GetClient(0)->ServiceIsPushingChanges()); | 153 EXPECT_TRUE(GetClient(0)->ServiceIsPushingChanges()); |
123 ProfileSyncService::Status status(GetService(0)->QueryDetailedSyncStatus()); | 154 ProfileSyncService::Status status(GetService(0)->QueryDetailedSyncStatus()); |
124 EXPECT_EQ(status.summary, ProfileSyncService::Status::READY); | 155 EXPECT_EQ(status.summary, ProfileSyncService::Status::READY); |
125 EXPECT_EQ(status.unsynced_count, 0); | 156 EXPECT_EQ(status.unsynced_count, 0); |
126 } | 157 } |
OLD | NEW |