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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_layout_unittest.mm

Issue 2862003004: Mac: Fix infobar anchor under Harmony. (Closed)
Patch Set: s/. I/ i/ Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #import "chrome/browser/ui/cocoa/browser_window_layout.h" 9 #import "chrome/browser/ui/cocoa/browser_window_layout.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 13 matching lines...) Expand all
24 [layout setShouldShowAvatar:YES]; 24 [layout setShouldShowAvatar:YES];
25 [layout setShouldUseNewAvatar:YES]; 25 [layout setShouldUseNewAvatar:YES];
26 [layout setAvatarSize:NSMakeSize(63, 28)]; 26 [layout setAvatarSize:NSMakeSize(63, 28)];
27 [layout setAvatarLineWidth:1]; 27 [layout setAvatarLineWidth:1];
28 [layout setHasToolbar:YES]; 28 [layout setHasToolbar:YES];
29 [layout setToolbarHeight:32]; 29 [layout setToolbarHeight:32];
30 [layout setPlaceBookmarkBarBelowInfoBar:NO]; 30 [layout setPlaceBookmarkBarBelowInfoBar:NO];
31 [layout setBookmarkBarHidden:NO]; 31 [layout setBookmarkBarHidden:NO];
32 [layout setBookmarkBarHeight:26]; 32 [layout setBookmarkBarHeight:26];
33 [layout setInfoBarHeight:72]; 33 [layout setInfoBarHeight:72];
34 [layout setPageInfoBubblePointY:13]; 34 [layout setInfoBarAnchorPointY:13];
35 [layout setHasDownloadShelf:YES]; 35 [layout setHasDownloadShelf:YES];
36 [layout setDownloadShelfHeight:44]; 36 [layout setDownloadShelfHeight:44];
37 [layout setOSYosemiteOrLater:NO]; 37 [layout setOSYosemiteOrLater:NO];
38 } 38 }
39 39
40 base::scoped_nsobject<BrowserWindowLayout> layout; 40 base::scoped_nsobject<BrowserWindowLayout> layout;
41 41
42 // Updates the layout parameters with the state associated with a typical 42 // Updates the layout parameters with the state associated with a typical
43 // fullscreened window. 43 // fullscreened window.
44 void ApplyStandardFullscreenLayoutParameters() { 44 void ApplyStandardFullscreenLayoutParameters() {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 // Tests that the avatar button is not aligned on the half pixel. 206 // Tests that the avatar button is not aligned on the half pixel.
207 TEST_F(BrowserWindowLayoutTest, TestAvatarButtonPixelAlignment) { 207 TEST_F(BrowserWindowLayoutTest, TestAvatarButtonPixelAlignment) {
208 [layout setAvatarSize:NSMakeSize(28, 28)]; 208 [layout setAvatarSize:NSMakeSize(28, 28)];
209 209
210 chrome::LayoutOutput output = [layout computeLayout]; 210 chrome::LayoutOutput output = [layout computeLayout];
211 211
212 EXPECT_NSEQ(NSMakeRect(537, 589, 28, 28), output.tabStripLayout.avatarFrame); 212 EXPECT_NSEQ(NSMakeRect(537, 589, 28, 28), output.tabStripLayout.avatarFrame);
213 } 213 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_layout.mm ('k') | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698