Chromium Code Reviews| Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc |
| diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc |
| index 3262df593f0a94ce6001257517e0d9e28ec48769..19dd3ebd7c1db5090fb8fe9aab80c44b6a77088a 100644 |
| --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc |
| +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc |
| @@ -287,6 +287,10 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase { |
| AddTestData(CreateBigMenu()); |
| + // Create the Widget. This ensures the following calculation correctly |
|
msw
2015/07/10 18:40:07
Hmm, where does the view get added to the widget?
tapted
2015/07/13 07:41:21
Yeah, this test harness is a bit crafty :). ViewEv
|
| + // applies borders which may be derived from the Widget's NativeTheme. |
| + ViewEventTestBase::SetUp(); |
|
msw
2015/07/10 18:40:07
nit: maybe call this at the top of the function?
tapted
2015/07/13 07:41:21
(see above)
|
| + |
| // Calculate the preferred size so that one button doesn't fit, which |
| // triggers the overflow button to appear. We have to do this incrementally |
| // as there isn't a good way to determine the point at which the overflow |
| @@ -302,8 +306,7 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase { |
| bb_view_->SetBounds(0, 0, bb_view_pref_.width(), bb_view_pref_.height()); |
| bb_view_->Layout(); |
| } while (GetBookmarkButton(6)->visible()); |
| - |
| - ViewEventTestBase::SetUp(); |
| + window_->SetSize(GetPreferredSize()); |
|
msw
2015/07/10 18:40:07
why is this needed now?
tapted
2015/07/13 07:41:22
(tl;dr "moved" this to the GetPreferredSize() test
|
| } |
| void TearDown() override { |