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

Unified Diff: ui/native_theme/native_theme_mac_unittest.cc

Issue 2120273002: Initialize MaterialDesignController in NativeThemeMacTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use more generic solution Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/native_theme/native_theme.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_mac_unittest.cc
diff --git a/ui/native_theme/native_theme_mac_unittest.cc b/ui/native_theme/native_theme_mac_unittest.cc
index c7c92d6d861b437a9e013f65d580bca6ee9f49e4..cd8d49bcf9f7485193c7a2a171eab97780c5ead1 100644
--- a/ui/native_theme/native_theme_mac_unittest.cc
+++ b/ui/native_theme/native_theme_mac_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ui/base/material_design/material_design_controller.h"
#include "ui/native_theme/native_theme_mac.h"
#include "base/mac/mac_util.h"
@@ -9,10 +10,17 @@
namespace ui {
+class NativeThemeMacTest : public testing::Test {
+ public:
+ static void SetUpTestCase() {
+ MaterialDesignController::Initialize();
+ }
+};
+
// Test to ensure any system colors that are looked up by name exist on all Mac
// platforms Chrome supports, and that their colorspace and component count is
// sane.
-TEST(NativeThemeMacTest, SystemColorsExist) {
+TEST_F(NativeThemeMacTest, SystemColorsExist) {
NativeTheme* native_theme = NativeThemeMac::instance();
ASSERT_TRUE(native_theme);
for (int i = 0; i < NativeTheme::kColorId_NumColors; ++i) {
@@ -27,7 +35,7 @@ TEST(NativeThemeMacTest, SystemColorsExist) {
// Spot-check some system colours that can't be changed through System
// Preferences.
-TEST(NativeThemeMacTest, SystemColorSpotChecks) {
+TEST_F(NativeThemeMacTest, SystemColorSpotChecks) {
NativeTheme* native_theme = NativeThemeMac::instance();
const SkColor kWindowColorCatsMavericks = SkColorSetARGB(255, 232, 232, 232);
const SkColor kWindowColorYosemite = SkColorSetARGB(255, 236, 236, 236);
« no previous file with comments | « ui/native_theme/native_theme.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698