#include "ui/views/controls/slider.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/i18n/rtl.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/events/event.h"
#include "ui/events/gesture_event_details.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/events/test/event_generator.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/test/ax_event_counter.h"
#include "ui/views/test/slider_test_api.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/widget_utils.h"
namespace {
class TestSliderListener : public views::SliderListener { … };
void TestSliderListener::SliderValueChanged(views::Slider* sender,
float value,
float old_value,
views::SliderChangeReason reason) { … }
void TestSliderListener::SliderDragStarted(views::Slider* sender) { … }
void TestSliderListener::SliderDragEnded(views::Slider* sender) { … }
}
namespace views {
enum class TestSliderType { … };
class SliderTest : public views::ViewsTestBase,
public testing::WithParamInterface<TestSliderType> { … };
void SliderTest::ClickAt(int x, int y) { … }
void SliderTest::SetUp() { … }
void SliderTest::TearDown() { … }
float SliderTest::GetMinValue() const { … }
float SliderTest::GetMaxValue() const { … }
TEST_P(SliderTest, UpdateFromClickHorizontal) { … }
TEST_P(SliderTest, UpdateFromClickRTLHorizontal) { … }
TEST_P(SliderTest, NukeAllowedValues) { … }
TEST_P(SliderTest, AccessibleRole) { … }
#if !BUILDFLAG(IS_MAC) || defined(USE_AURA)
TEST_P(SliderTest, SliderValueForTapGesture) { … }
TEST_P(SliderTest, SliderValueForScrollGesture) { … }
TEST_P(SliderTest, SliderValueForKeyboard) { … }
TEST_P(SliderTest, SliderListenerEventsForTapGesture) { … }
TEST_P(SliderTest, SliderListenerEventsForScrollGesture) { … }
TEST_P(SliderTest, SliderListenerEventsForMultiFingerScrollGesture) { … }
TEST_P(SliderTest, SliderRaisesA11yEvents) { … }
#endif
INSTANTIATE_TEST_SUITE_P(…);
}