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

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

Issue 10825302: mac: Remove more 10.5-only code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweak comments Created 8 years, 4 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 | Annotate | Revision Log
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 "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #import "base/mac/mac_util.h" 7 #import "base/mac/mac_util.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 23 matching lines...) Expand all
34 // This will be called multiple times. Wait until the profile is initialized 34 // This will be called multiple times. Wait until the profile is initialized
35 // fully to quit the loop. 35 // fully to quit the loop.
36 if (status == Profile::CREATE_STATUS_INITIALIZED) 36 if (status == Profile::CREATE_STATUS_INITIALIZED)
37 quit_closure.Run(); 37 quit_closure.Run();
38 } 38 }
39 39
40 // Tests that adding the first profile moves the Lion fullscreen button over 40 // Tests that adding the first profile moves the Lion fullscreen button over
41 // correctly. 41 // correctly.
42 IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, 42 IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest,
43 ProfileAvatarFullscreenButton) { 43 ProfileAvatarFullscreenButton) {
44 if (base::mac::IsOSSnowLeopardOrEarlier()) 44 if (base::mac::IsOSSnowLeopard())
45 return; 45 return;
46 46
47 // Initialize the locals. 47 // Initialize the locals.
48 ProfileManager* profile_manager = g_browser_process->profile_manager(); 48 ProfileManager* profile_manager = g_browser_process->profile_manager();
49 ASSERT_TRUE(profile_manager); 49 ASSERT_TRUE(profile_manager);
50 50
51 NSWindow* window = browser()->window()->GetNativeWindow(); 51 NSWindow* window = browser()->window()->GetNativeWindow();
52 ASSERT_TRUE(window); 52 ASSERT_TRUE(window);
53 53
54 BrowserWindowController* controller = 54 BrowserWindowController* controller =
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 EXPECT_EQ([avatar window], [fullscreen_button window]); 91 EXPECT_EQ([avatar window], [fullscreen_button window]);
92 92
93 // Make sure the visual order of the buttons is correct and that they don't 93 // Make sure the visual order of the buttons is correct and that they don't
94 // overlap. 94 // overlap.
95 NSRect avatar_frame = [avatar frame]; 95 NSRect avatar_frame = [avatar frame];
96 NSRect fullscreen_frame = [fullscreen_button frame]; 96 NSRect fullscreen_frame = [fullscreen_button frame];
97 97
98 EXPECT_LT(NSMinX(fullscreen_frame), NSMinX(avatar_frame)); 98 EXPECT_LT(NSMinX(fullscreen_frame), NSMinX(avatar_frame));
99 EXPECT_LT(NSMaxX(fullscreen_frame), NSMinX(avatar_frame)); 99 EXPECT_LT(NSMaxX(fullscreen_frame), NSMinX(avatar_frame));
100 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698