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

Unified Diff: ui/views/test/views_test_base.cc

Issue 154203002: Remove unnecessary uses of aura::Env::GetDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 | « ui/views/test/views_test_base.h ('k') | ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/views_test_base.cc
diff --git a/ui/views/test/views_test_base.cc b/ui/views/test/views_test_base.cc
index 37085e38acfd9413ff70475990da7a03873a261d..71b4204f165344df4f43f6629f6046b82a2efa23 100644
--- a/ui/views/test/views_test_base.cc
+++ b/ui/views/test/views_test_base.cc
@@ -7,14 +7,11 @@
#include "base/run_loop.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/ime/input_method_initializer.h"
-
-#if defined(USE_AURA)
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/aura/test/aura_test_helper.h"
#include "ui/views/corewm/capture_controller.h"
#include "ui/views/corewm/wm_state.h"
-#endif
namespace views {
@@ -35,12 +32,10 @@ void ViewsTestBase::SetUp() {
setup_called_ = true;
if (!views_delegate_.get())
views_delegate_.reset(new TestViewsDelegate());
-#if defined(USE_AURA)
aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
bool allow_test_contexts = true;
aura_test_helper_->SetUp(allow_test_contexts);
wm_state_.reset(new views::corewm::WMState);
-#endif // USE_AURA
ui::InitializeInputMethodForTesting();
}
@@ -54,36 +49,25 @@ void ViewsTestBase::TearDown() {
views_delegate_.reset();
testing::Test::TearDown();
ui::ShutdownInputMethodForTesting();
-#if defined(USE_AURA)
aura_test_helper_->TearDown();
wm_state_.reset();
CHECK(!corewm::ScopedCaptureClient::IsActive());
-#endif // USE_AURA
}
void ViewsTestBase::RunPendingMessages() {
base::RunLoop run_loop;
-#if defined(USE_AURA)
- run_loop.set_dispatcher(aura::Env::GetInstance()->GetDispatcher());
-#endif
run_loop.RunUntilIdle();
}
Widget::InitParams ViewsTestBase::CreateParams(
Widget::InitParams::Type type) {
Widget::InitParams params(type);
-#if defined(USE_AURA)
params.context = aura_test_helper_->root_window();
-#endif
return params;
}
gfx::NativeView ViewsTestBase::GetContext() {
-#if defined(USE_AURA)
return aura_test_helper_->root_window();
-#else
- return NULL;
-#endif
}
} // namespace views
« no previous file with comments | « ui/views/test/views_test_base.h ('k') | ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698