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

Unified Diff: ui/views/test/views_test_base.cc

Issue 1845343005: Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 8 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/views/linux_ui/linux_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/views_test_base.cc
diff --git a/ui/views/test/views_test_base.cc b/ui/views/test/views_test_base.cc
index 53e8683dc50cf3f450c5b1fd0b9c4afb83167e78..7516017edc1210ccbd3cef7b46c800f52cb82d34 100644
--- a/ui/views/test/views_test_base.cc
+++ b/ui/views/test/views_test_base.cc
@@ -8,6 +8,8 @@
#include "base/run_loop.h"
#include "ui/base/clipboard/clipboard.h"
+#include "ui/base/material_design/material_design_controller.h"
+#include "ui/base/test/material_design_controller_test_api.h"
namespace views {
@@ -25,6 +27,10 @@ ViewsTestBase::~ViewsTestBase() {
void ViewsTestBase::SetUp() {
testing::Test::SetUp();
+ // ContentTestSuiteBase might have already initialized
+ // MaterialDesignController in unit_tests suite.
+ ui::test::MaterialDesignControllerTestAPI::UninitializeMode();
+ ui::MaterialDesignController::Initialize();
setup_called_ = true;
if (!views_delegate_for_setup_)
views_delegate_for_setup_.reset(new TestViewsDelegate());
« no previous file with comments | « ui/views/linux_ui/linux_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698