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

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: 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 profile_->CreateBookmarkModel(true); 204 profile_->CreateBookmarkModel(true);
205 profile_->BlockUntilBookmarkModelLoaded(); 205 profile_->BlockUntilBookmarkModelLoaded();
206 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); 206 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true);
207 207
208 browser_.reset(new Browser(Browser::TYPE_TABBED, profile_.get())); 208 browser_.reset(new Browser(Browser::TYPE_TABBED, profile_.get()));
209 209
210 model_ = profile_->GetBookmarkModel(); 210 model_ = profile_->GetBookmarkModel();
211 model_->ClearStore(); 211 model_->ClearStore();
212 212
213 bb_view_.reset(new BookmarkBarView(browser_.get())); 213 bb_view_.reset(new BookmarkBarView(browser_.get()));
214 bb_view_->set_parent_owned(false); 214 bb_view_->set_not_owned_by_parent();
215 bb_view_->SetPageNavigator(&navigator_); 215 bb_view_->SetPageNavigator(&navigator_);
216 216
217 AddTestData(CreateBigMenu()); 217 AddTestData(CreateBigMenu());
218 218
219 // Calculate the preferred size so that one button doesn't fit, which 219 // Calculate the preferred size so that one button doesn't fit, which
220 // triggers the overflow button to appear. 220 // triggers the overflow button to appear.
221 // 221 //
222 // BookmarkBarView::Layout does nothing if the parent is NULL and 222 // BookmarkBarView::Layout does nothing if the parent is NULL and
223 // GetPreferredSize hard codes a width of 1. For that reason we add the 223 // GetPreferredSize hard codes a width of 1. For that reason we add the
224 // BookmarkBarView to a dumby view as the parent. 224 // BookmarkBarView to a dumby view as the parent.
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 ASSERT_TRUE(menu != NULL); 1618 ASSERT_TRUE(menu != NULL);
1619 ASSERT_TRUE(menu->GetSubmenu()->IsShowing()); 1619 ASSERT_TRUE(menu->GetSubmenu()->IsShowing());
1620 1620
1621 menu->GetMenuController()->CancelAll(); 1621 menu->GetMenuController()->CancelAll();
1622 1622
1623 Done(); 1623 Done();
1624 } 1624 }
1625 }; 1625 };
1626 1626
1627 VIEW_TEST(BookmarkBarViewTest19, SiblingMenu) 1627 VIEW_TEST(BookmarkBarViewTest19, SiblingMenu)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698