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 "chrome/browser/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 #include "chrome/browser/sync/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/profile_sync_service_harness.h" |
7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
8 #include "chrome/browser/sync/test/integration/sync_test.h" | 8 #include "chrome/browser/sync/test/integration/sync_test.h" |
9 #include "ui/base/layout.h" | 9 #include "ui/base/layout.h" |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 const BookmarkNode* wynn = AddURL(0, bar, 1, L"Wynn", | 145 const BookmarkNode* wynn = AddURL(0, bar, 1, L"Wynn", |
146 GURL("http://www.wynnlasvegas.com")); | 146 GURL("http://www.wynnlasvegas.com")); |
147 | 147 |
148 Move(0, wynn, tier3_b, 0); | 148 Move(0, wynn, tier3_b, 0); |
149 Move(0, leafs, tier3_b, 0); | 149 Move(0, leafs, tier3_b, 0); |
150 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion( | 150 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion( |
151 "Move after addition of bookmarks.")); | 151 "Move after addition of bookmarks.")); |
152 ASSERT_TRUE(ModelMatchesVerifier(0)); | 152 ASSERT_TRUE(ModelMatchesVerifier(0)); |
153 } | 153 } |
154 | 154 |
155 // Restart the sync service on a client and make sure sync is up and running. | |
156 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, | |
157 DISABLED_RestartSyncService) { | |
158 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | |
159 | |
160 ASSERT_TRUE(AddURL(0, L"Google", GURL("http://www.google.com"))); | |
161 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Added a bookmark.")); | |
162 ASSERT_TRUE(ModelMatchesVerifier(0)); | |
163 | |
164 RestartSyncService(0); | |
165 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Restarted sync.")); | |
166 ASSERT_TRUE(ModelMatchesVerifier(0)); | |
167 } | |
168 | |
169 // Test that a client doesn't mutate the favicon data in the process | 155 // Test that a client doesn't mutate the favicon data in the process |
170 // of storing the favicon data from sync to the database or in the process | 156 // of storing the favicon data from sync to the database or in the process |
171 // of requesting data from the database for sync. | 157 // of requesting data from the database for sync. |
172 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, | 158 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, |
173 SetFaviconHiDPIDifferentCodec) { | 159 SetFaviconHiDPIDifferentCodec) { |
174 // Set the supported scale factors to 1x and 2x such that | 160 // Set the supported scale factors to 1x and 2x such that |
175 // BookmarkModel::GetFavicon() requests both 1x and 2x. | 161 // BookmarkModel::GetFavicon() requests both 1x and 2x. |
176 // 1x -> for sync, 2x -> for the UI. | 162 // 1x -> for sync, 2x -> for the UI. |
177 std::vector<ui::ScaleFactor> supported_scale_factors; | 163 std::vector<ui::ScaleFactor> supported_scale_factors; |
178 supported_scale_factors.push_back(ui::SCALE_FACTOR_100P); | 164 supported_scale_factors.push_back(ui::SCALE_FACTOR_100P); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 237 |
252 // Remove all | 238 // Remove all |
253 RemoveAll(0); | 239 RemoveAll(0); |
254 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("All Bookmarks removed.")); | 240 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("All Bookmarks removed.")); |
255 // Verify other node has no children now. | 241 // Verify other node has no children now. |
256 EXPECT_EQ(0, GetOtherNode(0)->child_count()); | 242 EXPECT_EQ(0, GetOtherNode(0)->child_count()); |
257 EXPECT_EQ(0, GetBookmarkBarNode(0)->child_count()); | 243 EXPECT_EQ(0, GetBookmarkBarNode(0)->child_count()); |
258 // Verify model matches verifier. | 244 // Verify model matches verifier. |
259 ASSERT_TRUE(ModelMatchesVerifier(0)); | 245 ASSERT_TRUE(ModelMatchesVerifier(0)); |
260 } | 246 } |
OLD | NEW |