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

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

Issue 2738623002: [Mac] Turn on Auto Layout for browser windows. (Closed)
Patch Set: Nits. Created 3 years, 9 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/tabs/tab_window_controller.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_unittest.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
index 64404c0f008fe295a3ecc2d1552ad63444629f5e..cfd132c4cc9b854aa9dcb30202d1a8c41f8b4639 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
@@ -747,6 +747,16 @@ TEST_F(BrowserWindowControllerTest, TabStripBackgroundViewRedrawTest) {
[partial_mock verify];
}
+// Test that the window uses Auto Layout. Since frame-based layout and Auto
+// Layout behave differently in subtle ways, we shouldn't start/stop using it
+// accidentally. If we don't want Auto Layout, this test should be changed to
+// expect that chromeContentView has no constraints.
+TEST_F(BrowserWindowControllerTest, UsesAutoLayout) {
+ // If Auto Layout is on, there will be synthesized constraints based on the
+ // view's frame and autoresizing mask.
+ EXPECT_NE(0u, [[[controller_ chromeContentView] constraints] count]);
+}
+
@interface BrowserWindowControllerFakeFullscreen : BrowserWindowController {
@private
// We release the window ourselves, so we don't have to rely on the unittest
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/tab_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698