| Index: chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
|
| index ddb5682991aea29e3b0cf479e1d176bb139ebaec..4dee6de9f954b9db6bede297a0021dd03d202513 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
|
| @@ -9,6 +9,10 @@
|
| #import "chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #import "testing/gtest_mac.h"
|
| +#include "ui/base/material_design/material_design_controller.h"
|
| +#include "ui/gfx/image/image_skia_util_mac.h"
|
| +#include "ui/gfx/paint_vector_icon.h"
|
| +#include "ui/gfx/vector_icons_public.h"
|
|
|
| namespace {
|
|
|
| @@ -23,6 +27,16 @@ const CGFloat kNarrowWidth(5.0);
|
| class SelectedKeywordDecorationTest : public CocoaTest {
|
| public:
|
| SelectedKeywordDecorationTest() {
|
| + // With Material Design vector images the image isn't set at creation time
|
| + // but later by the LocationBar. The unit tests fail with a nil image, so
|
| + // initialize it now.
|
| + if (ui::MaterialDesignController::IsModeMaterial()) {
|
| + const int kDefaultIconSize = 16;
|
| + decoration_.SetImage(NSImageFromImageSkia(
|
| + gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_SEARCH,
|
| + kDefaultIconSize,
|
| + SK_ColorBLACK)));
|
| + }
|
| }
|
|
|
| SelectedKeywordDecoration decoration_;
|
|
|