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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc

Issue 1685763004: Fix various issues with popup/app window layout/drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Fix unittest Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc
index cd9fce1d82bd973a69c7ed1f181db0cbe29b54b7..8d3fd5191775dd0c8fcfc421e59d12634a8df7fd 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc
@@ -187,11 +187,10 @@ class OpaqueBrowserFrameViewLayoutTest : public views::ViewsTestBase {
int IconAndTitleY() const {
// This approximates the real positioning algorithm, which is complicated.
- int total_vertical_padding =
- (delegate_->IsMaximized() || !delegate_->ShouldShowCaptionButtons()) ?
- (kCaptionButtonHeight - delegate_->GetIconSize()) :
- (OBFVL::kFrameBorderThickness + OBFVL::kTitlebarTopEdgeThickness);
- return (total_vertical_padding + 1) / 2;
+ const int unavailable_px_at_top =
+ delegate_->IsMaximized() ? 0 : OBFVL::kTitlebarTopEdgeThickness;
+ return (unavailable_px_at_top + CaptionY() + kCaptionButtonHeight +
+ OBFVL::kCaptionButtonBottomPadding - delegate_->GetIconSize()) / 2;
}
void ExpectCaptionButtons(bool caption_buttons_on_left, int extra_height) {

Powered by Google App Engine
This is Rietveld 408576698