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

Unified Diff: ash/test/ash_test_helper_unittest.cc

Issue 2303453003: Revert of Moves ash content specific tests into ash_content_unittests (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ash/test/ash_test_views_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6801ee3e5482889bed180dd32141d66e2c3b8093..23db8de9b10ddd73b59a733150edb3cdc168b03c 100644
--- a/ash/test/ash_test_helper_unittest.cc
+++ b/ash/test/ash_test_helper_unittest.cc
@@ -4,12 +4,13 @@
#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"
-namespace ash {
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
// Tests for AshTestHelper. Who will watch the watchers? And who will test
// the tests?
@@ -20,11 +21,9 @@
void SetUp() override {
testing::Test::SetUp();
- ash_test_environment_ = test::AshTestEnvironment::Create();
- ash_test_helper_.reset(
- new test::AshTestHelper(ash_test_environment_.get()));
+ ash_test_helper_.reset(new ash::test::AshTestHelper(&message_loop_));
ash_test_helper_->SetUp(true,
- MaterialDesignController::Mode::UNINITIALIZED);
+ ash::MaterialDesignController::Mode::UNINITIALIZED);
}
void TearDown() override {
@@ -32,13 +31,11 @@
testing::Test::TearDown();
}
- test::AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); }
-
- protected:
- std::unique_ptr<test::AshTestEnvironment> ash_test_environment_;
+ ash::test::AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); }
private:
- std::unique_ptr<test::AshTestHelper> ash_test_helper_;
+ base::MessageLoopForUI message_loop_;
+ std::unique_ptr<ash::test::AshTestHelper> ash_test_helper_;
DISALLOW_COPY_AND_ASSIGN(AshTestHelperTest);
};
@@ -46,6 +43,7 @@
// 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());
EXPECT_TRUE(ash_test_helper()->test_shell_delegate());
EXPECT_TRUE(ash_test_helper()->CurrentContext());
@@ -60,5 +58,3 @@
EXPECT_TRUE(w1->IsActive());
EXPECT_TRUE(w1->IsVisible());
}
-
-} // namespace ash
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ash/test/ash_test_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698