Index: ash/test/ash_test_helper_unittest.cc |
diff --git a/ash/test/ash_test_helper_unittest.cc b/ash/test/ash_test_helper_unittest.cc |
index 23db8de9b10ddd73b59a733150edb3cdc168b03c..14690149ac7232bd1a6dc71d513d3036c9760779 100644 |
--- a/ash/test/ash_test_helper_unittest.cc |
+++ b/ash/test/ash_test_helper_unittest.cc |
@@ -4,13 +4,12 @@ |
#include "ash/test/ash_test_helper.h" |
+#include "ash/test/ash_test_environment.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "ui/aura/window_event_dispatcher.h" |
#include "ui/views/widget/widget.h" |
-#if defined(OS_WIN) |
-#include "base/win/windows_version.h" |
-#endif |
+namespace ash { |
// Tests for AshTestHelper. Who will watch the watchers? And who will test |
// the tests? |
@@ -21,9 +20,11 @@ class AshTestHelperTest : public testing::Test { |
void SetUp() override { |
testing::Test::SetUp(); |
- ash_test_helper_.reset(new ash::test::AshTestHelper(&message_loop_)); |
+ ash_test_environment_ = test::AshTestEnvironment::Create(); |
+ ash_test_helper_.reset( |
+ new test::AshTestHelper(ash_test_environment_.get())); |
ash_test_helper_->SetUp(true, |
- ash::MaterialDesignController::Mode::UNINITIALIZED); |
+ MaterialDesignController::Mode::UNINITIALIZED); |
} |
void TearDown() override { |
@@ -31,11 +32,13 @@ class AshTestHelperTest : public testing::Test { |
testing::Test::TearDown(); |
} |
- ash::test::AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); } |
+ test::AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); } |
+ |
+ protected: |
+ std::unique_ptr<test::AshTestEnvironment> ash_test_environment_; |
private: |
- base::MessageLoopForUI message_loop_; |
- std::unique_ptr<ash::test::AshTestHelper> ash_test_helper_; |
+ std::unique_ptr<test::AshTestHelper> ash_test_helper_; |
DISALLOW_COPY_AND_ASSIGN(AshTestHelperTest); |
}; |
@@ -43,7 +46,6 @@ class AshTestHelperTest : public testing::Test { |
// Ensure that we have initialized enough of Ash to create and show a window. |
TEST_F(AshTestHelperTest, AshTestHelper) { |
// Check initial state. |
- EXPECT_TRUE(ash_test_helper()->message_loop()); |
sky
2016/08/31 15:55:41
In order to continue supporting this assert (and s
James Cook
2016/08/31 16:20:17
This is fine.
|
EXPECT_TRUE(ash_test_helper()->test_shell_delegate()); |
EXPECT_TRUE(ash_test_helper()->CurrentContext()); |
@@ -58,3 +60,5 @@ TEST_F(AshTestHelperTest, AshTestHelper) { |
EXPECT_TRUE(w1->IsActive()); |
EXPECT_TRUE(w1->IsVisible()); |
} |
+ |
+} // namespase ash |
James Cook
2016/08/31 16:20:16
nit: namespace
sky
2016/08/31 17:35:57
Done.
|