summaryrefslogtreecommitdiffstats
path: root/tests/auto/macgui
diff options
context:
space:
mode:
authorKalle Juhani Lehtonen <kalle.ju.lehtonen@nokia.com>2012-07-25 09:34:33 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-25 02:11:16 +0200
commitc1e26903af2938cfcd75c7c6f6325b012cd9ccee (patch)
tree2fd5552f440d3241aa306f98f0ac62f4f7c38908 /tests/auto/macgui
parent2bc8b25c3e34d8accc53f89e19f6294ccfec620f (diff)
tst_MacGui is flaky
Set the testcase QEXPECT_FAIL only if it is going to fail. Waiting a fix for QTBUG-26514. Change-Id: I05017a347039c0fba4ba41d22d91d056dd4e908c Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Diffstat (limited to 'tests/auto/macgui')
-rw-r--r--tests/auto/macgui/tst_macgui.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/macgui/tst_macgui.cpp b/tests/auto/macgui/tst_macgui.cpp
index d8638cbcb7..221880eaee 100644
--- a/tests/auto/macgui/tst_macgui.cpp
+++ b/tests/auto/macgui/tst_macgui.cpp
@@ -99,13 +99,16 @@ void tst_MacGui::scrollbarPainting()
colorWidget.raise();
QTest::qWait(100);
- QPixmap pixmap = grabWindowContents(&colorWidget);
+ QImage image = grabWindowContents(&colorWidget).toImage();
- QVERIFY(isContent(pixmap.toImage(), verticalScrollbar.geometry(), GuiTester::Horizontal));
+ QVERIFY(isContent(image, verticalScrollbar.geometry(), GuiTester::Horizontal));
#ifdef Q_OS_MAC
- QEXPECT_FAIL("", "QTBUG-26514", Abort);
+ // this test seems to be unstable on OS X 10.6 (Snow Leopard)
+ if (!isContent(image, horizontalScrollbar.geometry(), GuiTester::Vertical)) {
+ QEXPECT_FAIL("", "QTBUG-20984", Abort);
+ }
#endif
- QVERIFY(isContent(pixmap.toImage(), horizontalScrollbar.geometry(), GuiTester::Vertical));
+ QVERIFY(isContent(image, horizontalScrollbar.geometry(), GuiTester::Vertical));
}
// When running the auto-tests on scruffy, the first enter-the-event-loop-and-wait-for-a-click