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

Unified Diff: ash/test/ash_test_base.h

Issue 2186363002: Set Ash material design mode in tests properly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup 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 | « ash/test/ash_md_test_base.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.h
diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h
index 288dbb54d30c6abc2f0a8ec531779556dcaed702..13de45402b956ef988da29c573f701af890209bd 100644
--- a/ash/test/ash_test_base.h
+++ b/ash/test/ash_test_base.h
@@ -10,6 +10,7 @@
#include <memory>
#include <string>
+#include "ash/common/material_design/material_design_controller.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
@@ -138,6 +139,12 @@ class AshTestBase : public testing::Test {
void set_start_session(bool start_session) { start_session_ = start_session; }
+ // Sets material mode for the test. This will override material mode set via
+ // command line switches.
+ void set_material_mode(MaterialDesignController::Mode material_mode) {
+ material_mode_ = material_mode;
bruthig 2016/07/28 21:40:25 Can you add 'CHECK(setup_called_)' here?
+ }
+
AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); }
void RunAllPendingInMessageLoop();
@@ -170,6 +177,7 @@ class AshTestBase : public testing::Test {
bool teardown_called_;
// |SetUp()| doesn't activate session if this is set to false.
bool start_session_;
+ MaterialDesignController::Mode material_mode_;
std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
std::unique_ptr<AshTestHelper> ash_test_helper_;
std::unique_ptr<ui::test::EventGenerator> event_generator_;
« no previous file with comments | « ash/test/ash_md_test_base.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698