Commit 4925eb8d authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Bandaid a test that only works in light mode.

A better fix would require rearchitecting that is beyond me at the moment.

Bug: none
Change-Id: I85ac54cd1cd031035bbe69cc596fc63bf59c5e8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2071384
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747056}
parent a49080e4
...@@ -4,10 +4,7 @@ ...@@ -4,10 +4,7 @@
#include "chrome/browser/extensions/extension_ui_util.h" #include "chrome/browser/extensions/extension_ui_util.h"
#include "chrome/browser/extensions/test_extension_environment.h"
#include "chrome/browser/themes/theme_properties.h" #include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/test/base/testing_profile.h"
#include "extensions/common/image_util.h" #include "extensions/common/image_util.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -18,15 +15,13 @@ namespace extensions { ...@@ -18,15 +15,13 @@ namespace extensions {
// need this test at the browser level, since the lower levels where // need this test at the browser level, since the lower levels where
// we use this value don't have access to the ThemeService. // we use this value don't have access to the ThemeService.
// //
// See ThemeProperties::GetDefaultColor() for the definition of the // TODO(pkasting): The validation that uses this color should happen at some
// default color. // point where the requesting Chrome window can supply the relevant toolbar
// color through an interface of some sort, removing this hardcoded value.
TEST(ExtensionUiUtilTest, CheckDefaultToolbarColor) { TEST(ExtensionUiUtilTest, CheckDefaultToolbarColor) {
TestExtensionEnvironment env; EXPECT_EQ(
TestingProfile profile; image_util::kDefaultToolbarColor,
const ui::ThemeProvider& provider = ThemeProperties::GetDefaultColor(ThemeProperties::COLOR_TOOLBAR, false))
ThemeService::GetThemeProviderForProfile(&profile);
EXPECT_EQ(image_util::kDefaultToolbarColor,
provider.GetColor(ThemeProperties::COLOR_TOOLBAR))
<< "Please update image_util::kDefaultToolbarColor to the new value"; << "Please update image_util::kDefaultToolbarColor to the new value";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment