| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/prefs/pref_registry_simple.h" | |
| 14 #include "base/prefs/testing_pref_service.h" | |
| 15 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/thread_task_runner_handle.h" | 14 #include "base/thread_task_runner_handle.h" |
| 17 #include "components/bookmarks/browser/bookmark_model.h" | 15 #include "components/bookmarks/browser/bookmark_model.h" |
| 18 #include "components/bookmarks/browser/bookmark_model_observer.h" | 16 #include "components/bookmarks/browser/bookmark_model_observer.h" |
| 19 #include "components/bookmarks/browser/bookmark_node.h" | 17 #include "components/bookmarks/browser/bookmark_node.h" |
| 20 #include "components/bookmarks/common/bookmark_pref_names.h" | 18 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 21 #include "components/bookmarks/test/bookmark_test_helpers.h" | 19 #include "components/bookmarks/test/bookmark_test_helpers.h" |
| 22 #include "components/bookmarks/test/mock_bookmark_model_observer.h" | 20 #include "components/bookmarks/test/mock_bookmark_model_observer.h" |
| 23 #include "components/bookmarks/test/test_bookmark_client.h" | 21 #include "components/bookmarks/test/test_bookmark_client.h" |
| 22 #include "components/prefs/pref_registry_simple.h" |
| 23 #include "components/prefs/testing_pref_service.h" |
| 24 #include "grit/components_strings.h" | 24 #include "grit/components_strings.h" |
| 25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 28 #include "url/gurl.h" | 28 #include "url/gurl.h" |
| 29 | 29 |
| 30 using testing::Mock; | 30 using testing::Mock; |
| 31 using testing::_; | 31 using testing::_; |
| 32 | 32 |
| 33 namespace bookmarks { | 33 namespace bookmarks { |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 Mock::VerifyAndClearExpectations(&observer_); | 335 Mock::VerifyAndClearExpectations(&observer_); |
| 336 | 336 |
| 337 EXPECT_CALL(observer_, BookmarkAllUserNodesRemoved(model_.get(), _)); | 337 EXPECT_CALL(observer_, BookmarkAllUserNodesRemoved(model_.get(), _)); |
| 338 model_->RemoveAllUserBookmarks(); | 338 model_->RemoveAllUserBookmarks(); |
| 339 EXPECT_EQ(2, managed_node()->child_count()); | 339 EXPECT_EQ(2, managed_node()->child_count()); |
| 340 EXPECT_EQ(0, model_->bookmark_bar_node()->child_count()); | 340 EXPECT_EQ(0, model_->bookmark_bar_node()->child_count()); |
| 341 Mock::VerifyAndClearExpectations(&observer_); | 341 Mock::VerifyAndClearExpectations(&observer_); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace bookmarks | 344 } // namespace bookmarks |
| OLD | NEW |