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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm

Issue 555243002: mac: Refactor browser_window_controller layout logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreen_layout
Patch Set: Comments from andresantoso, round 2. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
index 2d8fca884bcb855a3ce86183f8249c1df4eadea0..f75ec7415f6607e9bf8f2d1e8e7b717f5733845d 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
@@ -200,20 +200,17 @@ class BrowserWindowControllerTest : public InProcessBrowserTest {
}
NSInteger GetExpectedTopInfoBarTipHeight() {
- InfoBarContainerController* info_bar_container_controller =
- [controller() infoBarContainerController];
- CGFloat overlapping_tip_height =
- [info_bar_container_controller overlappingTipHeight];
+ // Bubble point in window coordinates.
LocationBarViewMac* location_bar_view = [controller() locationBarBridge];
NSPoint icon_bottom = location_bar_view->GetPageInfoBubblePoint();
- NSPoint info_bar_top = NSMakePoint(0,
- NSHeight([info_bar_container_controller view].frame) -
- overlapping_tip_height);
- info_bar_top = [[info_bar_container_controller view]
- convertPoint:info_bar_top toView:nil];
- return icon_bottom.y - info_bar_top.y;
+ // Toolbar's frame in window coordinates.
+ NSView* toolbar = [[controller() toolbarController] view];
+ NSRect toolbarFrame = [toolbar convertRect:toolbar.bounds toView:nil];
+
+ return icon_bottom.y - NSMinY(toolbarFrame);
}
+
// The traffic lights should always be in front of the content view and the
// tab strip view. Since the traffic lights change across OSX versions, this
// test verifies that the contentView is in the back, and if the tab strip
@@ -343,7 +340,7 @@ IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest,
[[[controller() window] contentView] addSubview:fullscreen_floating_bar
positioned:NSWindowBelow
relativeTo:nil];
- [controller() updateSubviewZOrder:[controller() inPresentationMode]];
+ [controller() updateSubviewZOrder];
std::vector<ViewID> view_list;
view_list.push_back(VIEW_ID_INFO_BAR);

Powered by Google App Engine
This is Rietveld 408576698