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

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

Issue 520733004: mac, yosemite: Resize button causes fullscreen effect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase against top of tree. 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39bb2400afe7c9b0100f04f541703b84ab16bb52..2d8fca884bcb855a3ce86183f8249c1df4eadea0 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
@@ -31,6 +31,7 @@
#import "chrome/browser/ui/cocoa/nsview_additions.h"
#import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
#import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
+#import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/find_bar/find_bar.h"
@@ -213,6 +214,19 @@ class BrowserWindowControllerTest : public InProcessBrowserTest {
convertPoint:info_bar_top toView:nil];
return icon_bottom.y - info_bar_top.y;
}
+ // 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
+ // view is a sibling, it is directly in front of the content view.
+ void VerifyTrafficLightZOrder() const {
+ NSView* contentView = [[controller() window] contentView];
+ NSView* rootView = [contentView superview];
+ EXPECT_EQ(contentView, [[rootView subviews] objectAtIndex:0]);
+
+ NSView* tabStripView = [controller() tabStripView];
+ if ([[rootView subviews] containsObject:tabStripView])
+ EXPECT_EQ(tabStripView, [[rootView subviews] objectAtIndex:1]);
+ }
private:
DISALLOW_COPY_AND_ASSIGN(BrowserWindowControllerTest);
@@ -462,3 +476,18 @@ IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest,
EXPECT_EQ(std::min(GetExpectedTopInfoBarTipHeight(), max_tip_height),
[[controller() infoBarContainerController] overlappingTipHeight]);
}
+
+IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, TrafficLightZOrder) {
+ // Verify z order immediately after creation.
+ VerifyTrafficLightZOrder();
+
+ // Toggle overlay, then verify z order.
+ [controller() showOverlay];
+ [controller() removeOverlay];
+ VerifyTrafficLightZOrder();
+
+ // Toggle immersive fullscreen, then verify z order.
+ [controller() enterImmersiveFullscreen];
+ [controller() exitImmersiveFullscreen];
+ VerifyTrafficLightZOrder();
+}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698