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

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: Fixed compile errors after rebase 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
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) {
tdanderson 2016/07/29 15:16:50 optional nit: consider calling this set_material_m
mohsen 2016/07/29 18:05:19 This whole class is for testing purposes. What wou
+ material_mode_ = material_mode;
+ }
+
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_;

Powered by Google App Engine
This is Rietveld 408576698