Skip hanging tst_QColorDialog test, expect failing test on Mac OS X

tst_QColorDialog::native_activeModalWidget() hangs, so skip this test.
tst_QColorDialog::task247349_alpha() fails, so XFAIL this failure.

Task-number: QTBUG-24320
Change-Id: Ie4d69e07063e9a648ec4fa3337274143a52ea3e3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
Bradley T. Hughes 2012-02-16 09:31:59 +01:00 committed by Qt by Nokia
parent 33fe2cf23f
commit a902387204

View File

@ -100,6 +100,9 @@ tst_QColorDialog::~tst_QColorDialog()
void tst_QColorDialog::native_activeModalWidget()
{
#ifdef Q_OS_MAC
QSKIP("Test hangs on Mac OS X, see QTBUG-24320");
#endif
// Check that QApplication::activeModalWidget retruns the
// color dialog when it is executing, even when using a native
// dialog:
@ -153,6 +156,9 @@ void tst_QColorDialog::task247349_alpha()
dialog.setOption(QColorDialog::ShowAlphaChannel, true);
int alpha = 0x17;
dialog.setCurrentColor(QColor(0x01, 0x02, 0x03, alpha));
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "Fails on Mac OS X, see QTBUG-24320", Abort);
#endif
QCOMPARE(alpha, dialog.currentColor().alpha());
QCOMPARE(alpha, qAlpha(dialog.currentColor().rgba()));
}