summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2014-03-04 17:52:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-20 19:01:53 +0100
commit23595107cd2366a86cf968578ddb17b827c7a596 (patch)
treeab07850ba35f1565877d8ddf1875718653cf95ed /tests/auto
parent80151389d6835629f746b0e61865b41d81a33feb (diff)
Respect scrollbar position setting on Mac
This was a regression from Qt 4.7. [ChangeLog][Widgets][QScrollArea] Respect scrollbar setting for click-position on Mac. Task-number: QTBUG-36314 Change-Id: I8bdb1aec9b308b0907f5db29d3519998bc843c18 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp9
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp4
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index adb3c26dce..4b577d59e5 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -990,15 +990,12 @@ void tst_QAbstractSlider::sliderPressedReleased()
QRect rect = slider->style()->subControlRect(QStyle::ComplexControl(control), &option,
QStyle::SubControl(subControl), slider);
+ if (qApp->style()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition))
+ QSKIP("The result depends on system setting on mac");
+
QTest::mousePress(slider, Qt::LeftButton, 0, QPoint(rect.center().x() + 2, rect.center().y() + 2));
-#ifdef Q_OS_MAC
- QEXPECT_FAIL("scrollbar on the groove", "QTBUG-23679", Continue);
-#endif
QCOMPARE(spy1.count(), expectedCount);
QTest::mouseRelease(slider, Qt::LeftButton, 0, rect.center());
-#ifdef Q_OS_MAC
- QEXPECT_FAIL("scrollbar on the groove", "QTBUG-23679", Continue);
-#endif
QCOMPARE(spy2.count(), expectedCount);
delete slider;
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 51dd0852ee..4e0c563fc1 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -147,6 +147,10 @@ void tst_QScrollBar::task_209492()
QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent);
// Check that the action was triggered once.
+
+#ifdef Q_OS_MAC
+ QSKIP("The result depends on system setting and is not relevant on Mac");
+#endif
QCOMPARE(scrollArea.scrollCount, 1);
QCOMPARE(spy.count(), 1);
}