Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge_unittest.mm

Issue 2853123002: Revert of [Mac] Refactor bookmark bar controller (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 two Loaded() in init routing makes 9. 116 // 7 calls above plus an initial Loaded() in init routine makes 8.
117 EXPECT_EQ(controller.get()->called_selectors_.size(), 9U); 117 EXPECT_EQ(controller.get()->called_selectors_.size(), 8U);
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
121 @selector(loaded:), 120 @selector(loaded:),
122 @selector(nodeMoved:oldParent:oldIndex:newParent:newIndex:), 121 @selector(nodeMoved:oldParent:oldIndex:newParent:newIndex:),
123 @selector(nodeAdded:parent:index:), 122 @selector(nodeAdded:parent:index:),
124 @selector(nodeChanged:node:), 123 @selector(nodeChanged:node:),
125 @selector(nodeFaviconLoaded:node:), 124 @selector(nodeFaviconLoaded:node:),
126 @selector(nodeChildrenReordered:node:), 125 @selector(nodeChildrenReordered:node:),
127 @selector(nodeRemoved:parent:index:) 126 @selector(nodeRemoved:parent:index:)
128 }; 127 };
129 EXPECT_EQ(controller.get()->called_selectors_, expected_selectors); 128 EXPECT_EQ(controller.get()->called_selectors_, expected_selectors);
130 } 129 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698