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

Unified Diff: ash/test/ash_test_helper.cc

Issue 1878973002: [reland] Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made it possible to restore MaterialDesignController state after each test case (nits) 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 | « no previous file | chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_helper.cc
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
index 9a76d5bb8192fc19bf0c07ce260173cc4761a846..4ed02de68a148469fa36472fa58a0ff4a378ce8c 100644
--- a/ash/test/ash_test_helper.cc
+++ b/ash/test/ash_test_helper.cc
@@ -24,6 +24,8 @@
#include "ui/aura/test/env_test_helper.h"
#include "ui/aura/test/event_generator_delegate_aura.h"
#include "ui/base/ime/input_method_initializer.h"
+#include "ui/base/material_design/material_design_controller.h"
+#include "ui/base/test/material_design_controller_test_api.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/message_center/message_center.h"
@@ -118,6 +120,10 @@ void AshTestHelper::SetUp(bool start_session) {
// last cursor visibility state, etc.
wm::CursorManager::ResetCursorVisibilityStateForTest();
+ // ContentTestSuiteBase might have already initialized
+ // MaterialDesignController in unit_tests suite.
+ ui::test::MaterialDesignControllerTestAPI::Uninitialize();
+ ui::MaterialDesignController::Initialize();
ShellInitParams init_params;
init_params.delegate = test_shell_delegate_;
init_params.context_factory = context_factory;
« no previous file with comments | « no previous file | chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698