OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/bookmarks/managed/managed_bookmark_service.h" | 5 #include "components/bookmarks/managed/managed_bookmark_service.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 13 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
14 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 14 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
15 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" | 15 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "components/bookmarks/browser/bookmark_model.h" | 17 #include "components/bookmarks/browser/bookmark_model.h" |
18 #include "components/bookmarks/browser/bookmark_node.h" | 18 #include "components/bookmarks/browser/bookmark_node.h" |
19 #include "components/bookmarks/browser/bookmark_utils.h" | 19 #include "components/bookmarks/browser/bookmark_utils.h" |
20 #include "components/bookmarks/common/bookmark_pref_names.h" | 20 #include "components/bookmarks/common/bookmark_pref_names.h" |
21 #include "components/bookmarks/test/bookmark_test_helpers.h" | 21 #include "components/bookmarks/test/bookmark_test_helpers.h" |
22 #include "components/bookmarks/test/mock_bookmark_model_observer.h" | 22 #include "components/bookmarks/test/mock_bookmark_model_observer.h" |
| 23 #include "components/strings/grit/components_strings.h" |
23 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 24 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
24 #include "content/public/test/test_browser_thread_bundle.h" | 25 #include "content/public/test/test_browser_thread_bundle.h" |
25 #include "grit/components_strings.h" | |
26 #include "testing/gmock/include/gmock/gmock.h" | 26 #include "testing/gmock/include/gmock/gmock.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
29 | 29 |
30 using bookmarks::BookmarkModel; | 30 using bookmarks::BookmarkModel; |
31 using bookmarks::BookmarkNode; | 31 using bookmarks::BookmarkNode; |
32 using bookmarks::ManagedBookmarkService; | 32 using bookmarks::ManagedBookmarkService; |
33 using testing::Mock; | 33 using testing::Mock; |
34 using testing::_; | 34 using testing::_; |
35 | 35 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 const BookmarkNode* managed_node = managed_->managed_node()->GetChild(0); | 287 const BookmarkNode* managed_node = managed_->managed_node()->GetChild(0); |
288 ASSERT_TRUE(managed_node); | 288 ASSERT_TRUE(managed_node); |
289 | 289 |
290 std::vector<const BookmarkNode*> nodes; | 290 std::vector<const BookmarkNode*> nodes; |
291 EXPECT_FALSE(bookmarks::HasDescendantsOf(nodes, managed_->managed_node())); | 291 EXPECT_FALSE(bookmarks::HasDescendantsOf(nodes, managed_->managed_node())); |
292 nodes.push_back(user_node); | 292 nodes.push_back(user_node); |
293 EXPECT_FALSE(bookmarks::HasDescendantsOf(nodes, managed_->managed_node())); | 293 EXPECT_FALSE(bookmarks::HasDescendantsOf(nodes, managed_->managed_node())); |
294 nodes.push_back(managed_node); | 294 nodes.push_back(managed_node); |
295 EXPECT_TRUE(bookmarks::HasDescendantsOf(nodes, managed_->managed_node())); | 295 EXPECT_TRUE(bookmarks::HasDescendantsOf(nodes, managed_->managed_node())); |
296 } | 296 } |
OLD | NEW |