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

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: Fix z ordering, add browser test. 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 99300210a2b397b05fca0597c93d2d8b3cc3b7f1..0bfcb09c2c70bd9a10d56bcbc74998c9fa3d7fce 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
@@ -28,6 +28,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"
@@ -134,6 +135,20 @@ class BrowserWindowControllerTest : public InProcessBrowserTest {
return height;
}
+ // 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 fo the content view.
Avi (use Gerrit) 2014/09/03 01:20:23 s/fo/of/
erikchen 2014/09/03 01:55:35 Done.
+ 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);
};
@@ -354,3 +369,18 @@ IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest,
DevToolsWindowTesting::CloseDevToolsWindowSync(devtools_window);
}
+
+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