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/browser/bookmark_expanded_state_tracker.h" | 5 #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
9 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/testing_pref_service.h" | 11 #include "base/prefs/testing_pref_service.h" |
11 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
12 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
13 #include "components/bookmarks/browser/bookmark_model.h" | 14 #include "components/bookmarks/browser/bookmark_model.h" |
14 #include "components/bookmarks/common/bookmark_pref_names.h" | 15 #include "components/bookmarks/common/bookmark_pref_names.h" |
15 #include "components/bookmarks/test/bookmark_test_helpers.h" | 16 #include "components/bookmarks/test/bookmark_test_helpers.h" |
16 #include "components/bookmarks/test/test_bookmark_client.h" | 17 #include "components/bookmarks/test/test_bookmark_client.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 tracker->SetExpandedNodes(nodes); | 94 tracker->SetExpandedNodes(nodes); |
94 // Verify that the node is present. | 95 // Verify that the node is present. |
95 EXPECT_EQ(nodes, tracker->GetExpandedNodes()); | 96 EXPECT_EQ(nodes, tracker->GetExpandedNodes()); |
96 // Call remove all. | 97 // Call remove all. |
97 model_->RemoveAllUserBookmarks(); | 98 model_->RemoveAllUserBookmarks(); |
98 // Verify node is not present. | 99 // Verify node is not present. |
99 EXPECT_TRUE(tracker->GetExpandedNodes().empty()); | 100 EXPECT_TRUE(tracker->GetExpandedNodes().empty()); |
100 } | 101 } |
101 | 102 |
102 } // namespace bookmarks | 103 } // namespace bookmarks |
OLD | NEW |