| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/profiles/avatar_button_controller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/browser/profiles/profile_manager.h" | 11 #include "chrome/browser/profiles/profile_manager.h" |
| 12 #include "chrome/browser/profiles/profiles_state.h" | 12 #include "chrome/browser/profiles/profiles_state.h" |
| 13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/browser_window.h" | 14 #include "chrome/browser/ui/browser_window.h" |
| 15 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 15 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 16 #include "chrome/browser/ui/cocoa/info_bubble_window.h" | 16 #include "chrome/browser/ui/cocoa/info_bubble_window.h" |
| 17 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 17 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
| 18 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" | 18 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" |
| 19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
| 20 #include "chrome/grit/generated_resources.h" | |
| 21 #include "chrome/grit/theme_resources.h" | |
| 22 #include "components/signin/core/common/profile_management_switches.h" | 20 #include "components/signin/core/common/profile_management_switches.h" |
| 23 #import "testing/gtest_mac.h" | 21 #import "testing/gtest_mac.h" |
| 24 #include "ui/base/material_design/material_design_controller.h" | 22 #include "ui/base/material_design/material_design_controller.h" |
| 25 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 26 | 24 |
| 27 // Defined in the AvatarButtonController implementation. | 25 // Defined in the AvatarButtonController implementation. |
| 28 @interface AvatarButtonController (ExposedForTesting) | 26 @interface AvatarButtonController (ExposedForTesting) |
| 29 - (void)setErrorStatus:(BOOL)hasError; | 27 - (void)setErrorStatus:(BOOL)hasError; |
| 30 - (void)updateAvatarButtonAndLayoutParent:(BOOL)layoutParent; | 28 - (void)updateAvatarButtonAndLayoutParent:(BOOL)layoutParent; |
| 31 @end | 29 @end |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 144 |
| 147 // Set the frame color to be dark. The button's title color should be white. | 145 // Set the frame color to be dark. The button's title color should be white. |
| 148 [controller() setIsFrameDark:YES]; | 146 [controller() setIsFrameDark:YES]; |
| 149 [controller() updateAvatarButtonAndLayoutParent:NO]; | 147 [controller() updateAvatarButtonAndLayoutParent:NO]; |
| 150 titleColor = | 148 titleColor = |
| 151 [[button() attributedTitle] attribute:NSForegroundColorAttributeName | 149 [[button() attributedTitle] attribute:NSForegroundColorAttributeName |
| 152 atIndex:0 | 150 atIndex:0 |
| 153 effectiveRange:nil]; | 151 effectiveRange:nil]; |
| 154 DCHECK_EQ(titleColor, [NSColor whiteColor]); | 152 DCHECK_EQ(titleColor, [NSColor whiteColor]); |
| 155 } | 153 } |
| OLD | NEW |