diff options
author | Kalle Juhani Lehtonen <kalle.ju.lehtonen@nokia.com> | 2012-07-24 23:34:33 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-25 00:11:16 (GMT) |
commit | c1e26903af2938cfcd75c7c6f6325b012cd9ccee (patch) | |
tree | 2fd5552f440d3241aa306f98f0ac62f4f7c38908 | |
parent | 2bc8b25c3e34d8accc53f89e19f6294ccfec620f (diff) | |
download | Qt-c1e26903af2938cfcd75c7c6f6325b012cd9ccee.zip Qt-c1e26903af2938cfcd75c7c6f6325b012cd9ccee.tar.gz Qt-c1e26903af2938cfcd75c7c6f6325b012cd9ccee.tar.bz2 |
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>
-rw-r--r-- | tests/auto/macgui/tst_macgui.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/macgui/tst_macgui.cpp b/tests/auto/macgui/tst_macgui.cpp index d8638cb..221880e 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 |