diff options
author | tapted <tapted@chromium.org> | 2014-12-01 14:59:21 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-01 22:59:39 +0000 |
commit | 6b292f0e88502b68cdc54ee27f939c5e714d8896 (patch) | |
tree | bb85a6faecf1ade8fc453094ae958747f7a71fb3 /ui/views/touchui/touch_selection_controller_impl_unittest.cc | |
parent | 3690e5bee816312c1d5d1f59ec453db6008a9084 (diff) | |
download | chromium_src-6b292f0e88502b68cdc54ee27f939c5e714d8896.zip chromium_src-6b292f0e88502b68cdc54ee27f939c5e714d8896.tar.gz chromium_src-6b292f0e88502b68cdc54ee27f939c5e714d8896.tar.bz2 |
Move DefaultScreenPositionClient setup to ViewsTestHelperAura
views_unittests doesn't currently link on a MacViews build.
This is because of incorrect USE_AURA guards in a recent change to
textfield_unittest.cc. Likely the same arrangement copied from
widget_interactive_uitest.cc
This consolidates the setup, so that all users of ViewsTestBase get a
screen position client on Aura by default. Tests can still set or
replace their own client (and some do).
BUG=378134
Review URL: https://codereview.chromium.org/759333004
Cr-Commit-Position: refs/heads/master@{#306284}
Diffstat (limited to 'ui/views/touchui/touch_selection_controller_impl_unittest.cc')
-rw-r--r-- | ui/views/touchui/touch_selection_controller_impl_unittest.cc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc index 3fa7666..5d0c693 100644 --- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc +++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc @@ -22,7 +22,6 @@ #include "ui/views/touchui/touch_selection_controller_impl.h" #include "ui/views/views_touch_selection_controller_factory.h" #include "ui/views/widget/widget.h" -#include "ui/wm/core/default_screen_position_client.h" using base::ASCIIToUTF16; using base::UTF16ToUTF8; @@ -77,7 +76,7 @@ class TouchSelectionControllerImplTest : public ViewsTestBase { void SetUp() override { ViewsTestBase::SetUp(); - SetUpRootWindowClients(GetContext()); + test_cursor_client_.reset(new aura::test::TestCursorClient(GetContext())); } void TearDown() override { @@ -277,19 +276,9 @@ class TouchSelectionControllerImplTest : public ViewsTestBase { Textfield* textfield_; scoped_ptr<TextfieldTestApi> textfield_test_api_; scoped_ptr<ViewsTouchSelectionControllerFactory> views_tsc_factory_; - scoped_ptr<wm::DefaultScreenPositionClient> screen_position_client_; scoped_ptr<aura::test::TestCursorClient> test_cursor_client_; private: - void SetUpRootWindowClients(aura::Window* root_window) { - if (!screen_position_client_) { - screen_position_client_.reset(new wm::DefaultScreenPositionClient()); - aura::client::SetScreenPositionClient(root_window, - screen_position_client_.get()); - test_cursor_client_.reset(new aura::test::TestCursorClient(root_window)); - } - } - DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerImplTest); }; |