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

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

Issue 2659623003: Re-enable FramedBrowserWindowTest.DoesHideTitle (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 FramedBrowserWindow* window_; 70 FramedBrowserWindow* window_;
71 }; 71 };
72 72
73 // Baseline test that the window creates, displays, closes, and 73 // Baseline test that the window creates, displays, closes, and
74 // releases. 74 // releases.
75 TEST_F(FramedBrowserWindowTest, ShowAndClose) { 75 TEST_F(FramedBrowserWindowTest, ShowAndClose) {
76 [window_ display]; 76 [window_ display];
77 } 77 }
78 78
79 // Test that undocumented title-hiding API we're using does the job. 79 // Test that undocumented title-hiding API we're using does the job.
80 // TODO(crbug.com/655112): Fails on Mac 10.11 Tests. 80 TEST_F(FramedBrowserWindowTest, DoesHideTitle) {
81 TEST_F(FramedBrowserWindowTest, DISABLED_DoesHideTitle) {
82 // The -display calls are not strictly necessary, but they do 81 // The -display calls are not strictly necessary, but they do
83 // make it easier to see what's happening when debugging (without 82 // make it easier to see what's happening when debugging (without
84 // them the changes are never flushed to the screen). 83 // them the changes are never flushed to the screen).
85 84
86 [window_ setTitle:@""]; 85 [window_ setTitle:@""];
87 [window_ display]; 86 [window_ display];
88 NSData* emptyTitleData = WindowContentsAsTIFF(); 87 NSData* emptyTitleData = WindowContentsAsTIFF();
89 88
90 [window_ setTitle:@"This is a title"]; 89 [window_ setTitle:@"This is a title"];
91 [window_ display]; 90 [window_ display];
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 EXPECT_TRUE(miniaturizeControl); 302 EXPECT_TRUE(miniaturizeControl);
304 miniaturizeFrame = [miniaturizeControl convertRect:[miniaturizeControl bounds] 303 miniaturizeFrame = [miniaturizeControl convertRect:[miniaturizeControl bounds]
305 toView:nil]; 304 toView:nil];
306 EXPECT_EQ(NSMaxY(miniaturizeFrame), 305 EXPECT_EQ(NSMaxY(miniaturizeFrame),
307 NSMaxY(windowBounds) - 306 NSMaxY(windowBounds) -
308 kFramedWindowButtonsWithTabStripOffsetFromTop); 307 kFramedWindowButtonsWithTabStripOffsetFromTop);
309 EXPECT_EQ(NSMinX(miniaturizeFrame), 308 EXPECT_EQ(NSMinX(miniaturizeFrame),
310 NSMaxX(closeBoxFrame) + [window_ windowButtonsInterButtonSpacing]); 309 NSMaxX(closeBoxFrame) + [window_ windowButtonsInterButtonSpacing]);
311 [window_ setWindowController:nil]; 310 [window_ setWindowController:nil];
312 } 311 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698