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/bookmarks/bookmark_model_factory.h" | 5 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
6 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" | 6 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" |
7 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 7 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
8 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" | 8 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 EXPECT_TRUE(bridge.get()); | 106 EXPECT_TRUE(bridge.get()); |
107 | 107 |
108 bridge->BookmarkModelLoaded(NULL, false); | 108 bridge->BookmarkModelLoaded(NULL, false); |
109 // |BookmarkModelBeingDeleted| is a no-op. | 109 // |BookmarkModelBeingDeleted| is a no-op. |
110 bridge->BookmarkNodeMoved(NULL, NULL, 0, NULL, 0); | 110 bridge->BookmarkNodeMoved(NULL, NULL, 0, NULL, 0); |
111 bridge->BookmarkNodeAdded(NULL, NULL, 0); | 111 bridge->BookmarkNodeAdded(NULL, NULL, 0); |
112 bridge->BookmarkNodeChanged(NULL, NULL); | 112 bridge->BookmarkNodeChanged(NULL, NULL); |
113 bridge->BookmarkNodeFaviconChanged(NULL, NULL); | 113 bridge->BookmarkNodeFaviconChanged(NULL, NULL); |
114 bridge->BookmarkNodeChildrenReordered(NULL, NULL); | 114 bridge->BookmarkNodeChildrenReordered(NULL, NULL); |
115 bridge->BookmarkNodeRemoved(NULL, NULL, 0, NULL, std::set<GURL>()); | 115 bridge->BookmarkNodeRemoved(NULL, NULL, 0, NULL, std::set<GURL>()); |
116 // 7 calls above plus an initial Loaded() in init routine makes 8. | 116 // 7 calls above plus two Loaded() in init routing makes 9. |
117 EXPECT_EQ(controller.get()->called_selectors_.size(), 8U); | 117 EXPECT_EQ(controller.get()->called_selectors_.size(), 9U); |
118 std::vector<SEL> expected_selectors = { | 118 std::vector<SEL> expected_selectors = { |
119 @selector(loaded:), // initial from init | 119 @selector(loaded:), // initial from init |
| 120 @selector(loaded:), // initial from init |
120 @selector(loaded:), | 121 @selector(loaded:), |
121 @selector(nodeMoved:oldParent:oldIndex:newParent:newIndex:), | 122 @selector(nodeMoved:oldParent:oldIndex:newParent:newIndex:), |
122 @selector(nodeAdded:parent:index:), | 123 @selector(nodeAdded:parent:index:), |
123 @selector(nodeChanged:node:), | 124 @selector(nodeChanged:node:), |
124 @selector(nodeFaviconLoaded:node:), | 125 @selector(nodeFaviconLoaded:node:), |
125 @selector(nodeChildrenReordered:node:), | 126 @selector(nodeChildrenReordered:node:), |
126 @selector(nodeRemoved:parent:index:) | 127 @selector(nodeRemoved:parent:index:) |
127 }; | 128 }; |
128 EXPECT_EQ(controller.get()->called_selectors_, expected_selectors); | 129 EXPECT_EQ(controller.get()->called_selectors_, expected_selectors); |
129 } | 130 } |
OLD | NEW |