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

Unified Diff: ash/shelf/shelf_view_unittest.cc

Issue 2186363002: Set Ash material design mode in tests properly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments 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 | « no previous file | ash/test/ash_md_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view_unittest.cc
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index 17ebe18112b63585db03eb3f6f094291d69c4443..6d88368b92d430140f2d458adfda437eb078c04a 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -2116,6 +2116,8 @@ class TestAppListShellDelegate : public TestShellDelegate {
} // namespace
+// Test fixture that forces material design mode in order to test ink drop
+// ripples on shelf.
class ShelfViewInkDropTest : public ShelfViewTest {
public:
ShelfViewInkDropTest() {}
@@ -2125,20 +2127,9 @@ class ShelfViewInkDropTest : public ShelfViewTest {
shell_delegate_ = new TestAppListShellDelegate;
ash_test_helper()->set_test_shell_delegate(shell_delegate_);
- ShelfViewTest::SetUp();
-
- // TODO(mohsen): Ideally, we would want to set material mode before calling
- // ShelfViewTest::SetUp() so that everything is set up with the correct
- // material mode. Currently, this is not possible as it expects material
- // mode be UNINITIALIZED. (See https://crbug.com/620093)
- ash_md_controller_.reset(new ash::test::MaterialDesignControllerTestAPI(
- ash::MaterialDesignController::MATERIAL_EXPERIMENTAL));
- }
+ set_material_mode(ash::MaterialDesignController::MATERIAL_EXPERIMENTAL);
- void TearDown() override {
- ash_md_controller_.reset();
-
- ShelfViewTest::TearDown();
+ ShelfViewTest::SetUp();
}
protected:
@@ -2179,9 +2170,6 @@ class ShelfViewInkDropTest : public ShelfViewTest {
shell_delegate_->app_list_presenter()->FinishVisibilityChange();
}
- std::unique_ptr<ash::test::MaterialDesignControllerTestAPI>
- ash_md_controller_;
-
TestAppListShellDelegate* shell_delegate_ = nullptr; // Owned by Shell.
AppListButton* app_list_button_ = nullptr;
« no previous file with comments | « no previous file | ash/test/ash_md_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698