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); |