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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc

Issue 10384068: views: Have a more accurate name for View parent_owned accessors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 profile_->CreateBookmarkModel(true); 173 profile_->CreateBookmarkModel(true);
174 profile_->BlockUntilBookmarkModelLoaded(); 174 profile_->BlockUntilBookmarkModelLoaded();
175 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); 175 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true);
176 176
177 browser_.reset(new Browser(Browser::TYPE_TABBED, profile_.get())); 177 browser_.reset(new Browser(Browser::TYPE_TABBED, profile_.get()));
178 178
179 model_ = profile_->GetBookmarkModel(); 179 model_ = profile_->GetBookmarkModel();
180 model_->ClearStore(); 180 model_->ClearStore();
181 181
182 bb_view_.reset(new BookmarkBarView(browser_.get())); 182 bb_view_.reset(new BookmarkBarView(browser_.get()));
183 bb_view_->set_parent_owned(false); 183 bb_view_->set_owned_by_client();
184 bb_view_->SetPageNavigator(&navigator_); 184 bb_view_->SetPageNavigator(&navigator_);
185 185
186 AddTestData(CreateBigMenu()); 186 AddTestData(CreateBigMenu());
187 187
188 // Calculate the preferred size so that one button doesn't fit, which 188 // Calculate the preferred size so that one button doesn't fit, which
189 // triggers the overflow button to appear. 189 // triggers the overflow button to appear.
190 // 190 //
191 // BookmarkBarView::Layout does nothing if the parent is NULL and 191 // BookmarkBarView::Layout does nothing if the parent is NULL and
192 // GetPreferredSize hard codes a width of 1. For that reason we add the 192 // GetPreferredSize hard codes a width of 1. For that reason we add the
193 // BookmarkBarView to a dumby view as the parent. 193 // BookmarkBarView to a dumby view as the parent.
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 ASSERT_TRUE(menu != NULL); 1622 ASSERT_TRUE(menu != NULL);
1623 ASSERT_TRUE(menu->GetSubmenu()->IsShowing()); 1623 ASSERT_TRUE(menu->GetSubmenu()->IsShowing());
1624 1624
1625 menu->GetMenuController()->CancelAll(); 1625 menu->GetMenuController()->CancelAll();
1626 1626
1627 Done(); 1627 Done();
1628 } 1628 }
1629 }; 1629 };
1630 1630
1631 VIEW_TEST(BookmarkBarViewTest19, SiblingMenu) 1631 VIEW_TEST(BookmarkBarViewTest19, SiblingMenu)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698