| Index: chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm
|
| index 26572c6e2fb2308e3c3c8600457e1a52e9aa9fb6..2b765e50eea4aa2bd4221dffbc8487ae0ada2629 100644
|
| --- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller_unittest.mm
|
| @@ -22,6 +22,7 @@
|
| #include "grit/theme_resources.h"
|
| #import "testing/gtest_mac.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| +#include "ui/base/material_design/material_design_controller.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
|
|
| // Defined in the AvatarButtonController implementation.
|
| @@ -107,9 +108,15 @@ TEST_F(AvatarButtonControllerTest, ProfileButtonWithErrorShown) {
|
| ASSERT_FALSE([view() isHidden]);
|
| EXPECT_NSEQ(@"Person 1", [button() title]);
|
|
|
| - // If the button has an authentication error, it should display an error icon.
|
| - int errorWidth = ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
|
| - IDR_ICON_PROFILES_AVATAR_BUTTON_ERROR).Width();
|
| + // If the button has an authentication error, it should display an error
|
| + // icon. If in the MD, the icon size should be 16.
|
| + int errorWidth =
|
| + ui::MaterialDesignController::IsModeMaterial()
|
| + ? 16
|
| + : ui::ResourceBundle::GetSharedInstance()
|
| + .GetNativeImageNamed(IDR_ICON_PROFILES_AVATAR_BUTTON_ERROR)
|
| + .Width();
|
| +
|
| EXPECT_EQ(errorWidth, [button() image].size.width);
|
| }
|
|
|
|
|