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_bookmarks_tracker.h" | 5 #include "components/bookmarks/managed/managed_bookmarks_tracker.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "components/bookmarks/browser/bookmark_model.h" | 17 #include "components/bookmarks/browser/bookmark_model.h" |
18 #include "components/bookmarks/browser/bookmark_model_observer.h" | 18 #include "components/bookmarks/browser/bookmark_model_observer.h" |
19 #include "components/bookmarks/browser/bookmark_node.h" | 19 #include "components/bookmarks/browser/bookmark_node.h" |
20 #include "components/bookmarks/browser/bookmark_utils.h" | 20 #include "components/bookmarks/browser/bookmark_utils.h" |
21 #include "components/bookmarks/common/bookmark_pref_names.h" | 21 #include "components/bookmarks/common/bookmark_pref_names.h" |
22 #include "components/bookmarks/test/bookmark_test_helpers.h" | 22 #include "components/bookmarks/test/bookmark_test_helpers.h" |
23 #include "components/bookmarks/test/mock_bookmark_model_observer.h" | 23 #include "components/bookmarks/test/mock_bookmark_model_observer.h" |
24 #include "components/bookmarks/test/test_bookmark_client.h" | 24 #include "components/bookmarks/test/test_bookmark_client.h" |
25 #include "components/prefs/pref_registry_simple.h" | 25 #include "components/prefs/pref_registry_simple.h" |
26 #include "components/prefs/testing_pref_service.h" | 26 #include "components/prefs/testing_pref_service.h" |
27 #include "grit/components_strings.h" | 27 #include "components/strings/grit/components_strings.h" |
28 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 #include "url/gurl.h" | 31 #include "url/gurl.h" |
32 | 32 |
33 using testing::Mock; | 33 using testing::Mock; |
34 using testing::_; | 34 using testing::_; |
35 | 35 |
36 namespace bookmarks { | 36 namespace bookmarks { |
37 | 37 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 Mock::VerifyAndClearExpectations(&observer_); | 355 Mock::VerifyAndClearExpectations(&observer_); |
356 | 356 |
357 EXPECT_CALL(observer_, BookmarkAllUserNodesRemoved(model_.get(), _)); | 357 EXPECT_CALL(observer_, BookmarkAllUserNodesRemoved(model_.get(), _)); |
358 model_->RemoveAllUserBookmarks(); | 358 model_->RemoveAllUserBookmarks(); |
359 EXPECT_EQ(2, managed_node()->child_count()); | 359 EXPECT_EQ(2, managed_node()->child_count()); |
360 EXPECT_EQ(0, model_->bookmark_bar_node()->child_count()); | 360 EXPECT_EQ(0, model_->bookmark_bar_node()->child_count()); |
361 Mock::VerifyAndClearExpectations(&observer_); | 361 Mock::VerifyAndClearExpectations(&observer_); |
362 } | 362 } |
363 | 363 |
364 } // namespace bookmarks | 364 } // namespace bookmarks |
OLD | NEW |