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/sync/test/integration/bookmarks_helper.h" | 5 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/bookmarks/bookmark_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 13 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
13 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 14 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
14 #include "chrome/browser/bookmarks/bookmark_utils.h" | 15 #include "chrome/browser/bookmarks/bookmark_utils.h" |
15 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 17 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
17 #include "chrome/browser/sync/profile_sync_service_harness.h" | 18 #include "chrome/browser/sync/profile_sync_service_harness.h" |
18 #include "chrome/browser/sync/test/integration/sync_test.h" | 19 #include "chrome/browser/sync/test/integration/sync_test.h" |
19 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 20 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
20 #include "chrome/test/base/ui_test_utils.h" | 21 #include "chrome/test/base/ui_test_utils.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "third_party/skia/include/core/SkBitmap.h" | 23 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 ASSERT_TRUE(NodesMatch(foreign_node, walker)); | 251 ASSERT_TRUE(NodesMatch(foreign_node, walker)); |
251 *result = walker; | 252 *result = walker; |
252 } | 253 } |
253 | 254 |
254 } // namespace | 255 } // namespace |
255 | 256 |
256 | 257 |
257 namespace bookmarks_helper { | 258 namespace bookmarks_helper { |
258 | 259 |
259 BookmarkModel* GetBookmarkModel(int index) { | 260 BookmarkModel* GetBookmarkModel(int index) { |
260 return test()->GetProfile(index)->GetBookmarkModel(); | 261 return BookmarkModelFactory::GetForProfile(test()->GetProfile(index)); |
261 } | 262 } |
262 | 263 |
263 const BookmarkNode* GetBookmarkBarNode(int index) { | 264 const BookmarkNode* GetBookmarkBarNode(int index) { |
264 return GetBookmarkModel(index)->bookmark_bar_node(); | 265 return GetBookmarkModel(index)->bookmark_bar_node(); |
265 } | 266 } |
266 | 267 |
267 const BookmarkNode* GetOtherNode(int index) { | 268 const BookmarkNode* GetOtherNode(int index) { |
268 return GetBookmarkModel(index)->other_node(); | 269 return GetBookmarkModel(index)->other_node(); |
269 } | 270 } |
270 | 271 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 | 600 |
600 std::wstring IndexedSubfolderName(int i) { | 601 std::wstring IndexedSubfolderName(int i) { |
601 return StringPrintf(L"Subfolder Name %d", i); | 602 return StringPrintf(L"Subfolder Name %d", i); |
602 } | 603 } |
603 | 604 |
604 std::wstring IndexedSubsubfolderName(int i) { | 605 std::wstring IndexedSubsubfolderName(int i) { |
605 return StringPrintf(L"Subsubfolder Name %d", i); | 606 return StringPrintf(L"Subsubfolder Name %d", i); |
606 } | 607 } |
607 | 608 |
608 } // namespace bookmarks_helper | 609 } // namespace bookmarks_helper |
OLD | NEW |