diff options
author | bruthig@chromium.org <bruthig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-13 21:52:13 +0000 |
---|---|---|
committer | bruthig@chromium.org <bruthig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-13 21:52:13 +0000 |
commit | 9c67c2986d663cd3556326e84bcbba465bde6ad6 (patch) | |
tree | a975097178dee87f16aa25b63c7c2c71930bce7d /ui/views/test/slider_test_api.h | |
parent | 278014182a92333dc97785adb577c5293785b306 (diff) | |
download | chromium_src-9c67c2986d663cd3556326e84bcbba465bde6ad6.zip chromium_src-9c67c2986d663cd3556326e84bcbba465bde6ad6.tar.gz chromium_src-9c67c2986d663cd3556326e84bcbba465bde6ad6.tar.bz2 |
Updated Slider to raise drag started and ended events for touch gestures.
BUG=370181
Test=SliderTest.GesturesWithNoListener, SliderTest.TapGesture, SliderTest.ScrollGestureWithoutUpdate, SliderTest.ScrollGestureWithUpdate, SliderTest.ScrollGestureTransitionsToFling
Review URL: https://codereview.chromium.org/308003008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/test/slider_test_api.h')
-rw-r--r-- | ui/views/test/slider_test_api.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ui/views/test/slider_test_api.h b/ui/views/test/slider_test_api.h new file mode 100644 index 0000000..749ff4e --- /dev/null +++ b/ui/views/test/slider_test_api.h @@ -0,0 +1,38 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_VIEWS_TEST_SLIDER_TEST_API_H_ +#define UI_VIEWS_TEST_SLIDER_TEST_API_H_ + +#include "base/basictypes.h" + +namespace views { + +class Slider; +class SliderListener; + +namespace test { + +// Can be used to update the private state of a views::Slider instance during a +// test. Updating the private state of an already created instance reduces +// the amount of test setup and test fixture code required. +class SliderTestApi { + public: + explicit SliderTestApi(Slider* slider); + virtual ~SliderTestApi(); + + // Set the SliderListener on the Slider. + void SetListener(SliderListener* listener); + + private: + Slider* slider_; + + DISALLOW_COPY_AND_ASSIGN(SliderTestApi); +}; + +} // namespace test + +} // namespace views + +#endif // UI_VIEWS_TEST_SLIDER_TEST_API_H_ |