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

Side by Side Diff: ash/test/ash_test_helper_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, 4 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 unified diff | Download patch
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/test/ash_test_helper.h" 5 #include "ash/test/ash_test_helper.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/aura/window_event_dispatcher.h" 8 #include "ui/aura/window_event_dispatcher.h"
9 #include "ui/views/widget/widget.h" 9 #include "ui/views/widget/widget.h"
10 10
11 #if defined(OS_WIN) 11 #if defined(OS_WIN)
12 #include "base/win/windows_version.h" 12 #include "base/win/windows_version.h"
13 #endif 13 #endif
14 14
15 // Tests for AshTestHelper. Who will watch the watchers? And who will test 15 // Tests for AshTestHelper. Who will watch the watchers? And who will test
16 // the tests? 16 // the tests?
17 class AshTestHelperTest : public testing::Test { 17 class AshTestHelperTest : public testing::Test {
18 public: 18 public:
19 AshTestHelperTest() {} 19 AshTestHelperTest() {}
20 ~AshTestHelperTest() override {} 20 ~AshTestHelperTest() override {}
21 21
22 void SetUp() override { 22 void SetUp() override {
23 testing::Test::SetUp(); 23 testing::Test::SetUp();
24 ash_test_helper_.reset(new ash::test::AshTestHelper(&message_loop_)); 24 ash_test_helper_.reset(new ash::test::AshTestHelper(&message_loop_));
25 ash_test_helper_->SetUp(true); 25 ash_test_helper_->SetUp(true,
26 ash::MaterialDesignController::Mode::UNINITIALIZED);
26 } 27 }
27 28
28 void TearDown() override { 29 void TearDown() override {
29 ash_test_helper_->TearDown(); 30 ash_test_helper_->TearDown();
30 testing::Test::TearDown(); 31 testing::Test::TearDown();
31 } 32 }
32 33
33 ash::test::AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); } 34 ash::test::AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); }
34 35
35 private: 36 private:
(...skipping 14 matching lines...) Expand all
50 using views::Widget; 51 using views::Widget;
51 std::unique_ptr<Widget> w1(new Widget); 52 std::unique_ptr<Widget> w1(new Widget);
52 Widget::InitParams params; 53 Widget::InitParams params;
53 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 54 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
54 params.context = ash_test_helper()->CurrentContext(); 55 params.context = ash_test_helper()->CurrentContext();
55 w1->Init(params); 56 w1->Init(params);
56 w1->Show(); 57 w1->Show();
57 EXPECT_TRUE(w1->IsActive()); 58 EXPECT_TRUE(w1->IsActive());
58 EXPECT_TRUE(w1->IsVisible()); 59 EXPECT_TRUE(w1->IsVisible());
59 } 60 }
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698