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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_unittest.mm

Issue 2811793002: Turn off Auto Layout pending investigation of a performance regression. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 [partial_mock verify]; 747 [partial_mock verify];
748 } 748 }
749 749
750 // Test that the window uses Auto Layout. Since frame-based layout and Auto 750 // Test that the window uses Auto Layout. Since frame-based layout and Auto
751 // Layout behave differently in subtle ways, we shouldn't start/stop using it 751 // Layout behave differently in subtle ways, we shouldn't start/stop using it
752 // accidentally. If we don't want Auto Layout, this test should be changed to 752 // accidentally. If we don't want Auto Layout, this test should be changed to
753 // expect that chromeContentView has no constraints. 753 // expect that chromeContentView has no constraints.
754 TEST_F(BrowserWindowControllerTest, UsesAutoLayout) { 754 TEST_F(BrowserWindowControllerTest, UsesAutoLayout) {
755 // If Auto Layout is on, there will be synthesized constraints based on the 755 // If Auto Layout is on, there will be synthesized constraints based on the
756 // view's frame and autoresizing mask. 756 // view's frame and autoresizing mask.
757 EXPECT_NE(0u, [[[controller_ chromeContentView] constraints] count]); 757 // TODO(sdy): Turn back on (or remove) after investigating a performance
758 // regression: https://crbug.com/706931
759 EXPECT_EQ(0u, [[[controller_ chromeContentView] constraints] count]);
758 } 760 }
759 761
760 @interface BrowserWindowControllerFakeFullscreen : BrowserWindowController { 762 @interface BrowserWindowControllerFakeFullscreen : BrowserWindowController {
761 @private 763 @private
762 // We release the window ourselves, so we don't have to rely on the unittest 764 // We release the window ourselves, so we don't have to rely on the unittest
763 // doing it for us. 765 // doing it for us.
764 base::scoped_nsobject<NSWindow> testFullscreenWindow_; 766 base::scoped_nsobject<NSWindow> testFullscreenWindow_;
765 } 767 }
766 @end 768 @end
767 769
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400) 856 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400)
855 styleMask:NSBorderlessWindowMask 857 styleMask:NSBorderlessWindowMask
856 backing:NSBackingStoreBuffered 858 backing:NSBackingStoreBuffered
857 defer:NO]); 859 defer:NO]);
858 [[testFullscreenWindow_ contentView] setWantsLayer:YES]; 860 [[testFullscreenWindow_ contentView] setWantsLayer:YES];
859 return testFullscreenWindow_.get(); 861 return testFullscreenWindow_.get();
860 } 862 }
861 @end 863 @end
862 864
863 /* TODO(???): test other methods of BrowserWindowController */ 865 /* TODO(???): test other methods of BrowserWindowController */
OLDNEW
« 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