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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc

Issue 23447015: linux_aura: Right window caption buttons now match GTK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/views/frame/opaque_browser_frame_view_layout.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/views/tab_icon_view.h" 9 #include "chrome/browser/ui/views/tab_icon_view.h"
10 #include "chrome/browser/ui/views/tabs/tab.h" 10 #include "chrome/browser/ui/views/tabs/tab.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 class OpaqueBrowserFrameViewLayoutTest : public views::ViewsTestBase { 131 class OpaqueBrowserFrameViewLayoutTest : public views::ViewsTestBase {
132 public: 132 public:
133 OpaqueBrowserFrameViewLayoutTest() {} 133 OpaqueBrowserFrameViewLayoutTest() {}
134 virtual ~OpaqueBrowserFrameViewLayoutTest() {} 134 virtual ~OpaqueBrowserFrameViewLayoutTest() {}
135 135
136 virtual void SetUp() OVERRIDE { 136 virtual void SetUp() OVERRIDE {
137 views::ViewsTestBase::SetUp(); 137 views::ViewsTestBase::SetUp();
138 138
139 delegate_.reset(new TestLayoutDelegate); 139 delegate_.reset(new TestLayoutDelegate);
140 layout_manager_ = new OpaqueBrowserFrameViewLayout(delegate_.get()); 140 layout_manager_ = new OpaqueBrowserFrameViewLayout(delegate_.get());
141 layout_manager_->set_extra_caption_y(0);
142 layout_manager_->set_window_caption_spacing(0);
141 widget_ = new Widget; 143 widget_ = new Widget;
142 widget_->Init(CreateParams(Widget::InitParams::TYPE_POPUP)); 144 widget_->Init(CreateParams(Widget::InitParams::TYPE_POPUP));
143 root_view_ = widget_->GetRootView(); 145 root_view_ = widget_->GetRootView();
144 root_view_->SetSize(gfx::Size(kWidth, kWidth)); 146 root_view_->SetSize(gfx::Size(kWidth, kWidth));
145 root_view_->SetLayoutManager(layout_manager_); 147 root_view_->SetLayoutManager(layout_manager_);
146 148
147 // Add the caption buttons. We use fake images because we're modeling the 149 // Add the caption buttons. We use fake images because we're modeling the
148 // Windows assets here, while the linux version uses differently sized 150 // Windows assets here, while the linux version uses differently sized
149 // assets. 151 // assets.
150 // 152 //
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 296
295 ExpectBasicWindowBounds(); 297 ExpectBasicWindowBounds();
296 298
297 // Check the location of the avatar 299 // Check the location of the avatar
298 EXPECT_EQ("7,11 40x29", menu_button_->bounds().ToString()); 300 EXPECT_EQ("7,11 40x29", menu_button_->bounds().ToString());
299 EXPECT_EQ("45,13 352x29", 301 EXPECT_EQ("45,13 352x29",
300 layout_manager_->GetBoundsForTabStrip( 302 layout_manager_->GetBoundsForTabStrip(
301 delegate_->GetTabstripPreferredSize(), kWidth).ToString()); 303 delegate_->GetTabstripPreferredSize(), kWidth).ToString());
302 EXPECT_EQ("261x73", layout_manager_->GetMinimumSize(kWidth).ToString()); 304 EXPECT_EQ("261x73", layout_manager_->GetMinimumSize(kWidth).ToString());
303 } 305 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698