From aeb21c73c5e4fc585340145374800a5e285e7ab7 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Wed, 19 Sep 2012 15:45:13 +0200 Subject: [PATCH] test: Mark tst_QMdiSubWindow failures as XFAIL The test has lots of failures, so mark these with QEXPECT_FAIL and remove the QSKIP. Task-number: QTBUG-22310 Task-number: QTBUG-27274 Change-Id: I0d38cedb581741b6edae5d1c3f4410714099a7fb Reviewed-by: Caroline Chao --- .../widgets/qmdisubwindow/tst_qmdisubwindow.cpp | 42 +++++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp index 8877be6..77a3dd5 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp @@ -892,7 +892,6 @@ void tst_QMdiSubWindow::setWindowFlags_data() void tst_QMdiSubWindow::setWindowFlags() { - QSKIP("Until we have a QEvent::WindowFlagsChange event, this will skip"); QFETCH(Qt::WindowType, windowType); QFETCH(Qt::WindowType, expectedWindowType); QFETCH(Qt::WindowFlags, customFlags); @@ -906,12 +905,40 @@ void tst_QMdiSubWindow::setWindowFlags() QVERIFY(QTest::qWaitForWindowExposed(&workspace)); window->setWindowFlags(windowType | customFlags); + QEXPECT_FAIL("Qt::Widget", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Window", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Dialog", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Sheet", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Drawer", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Popup", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Tool", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::ToolTip", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::SplashScreen", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Desktop", "QTBUG-27274", Continue); QCOMPARE(window->windowType(), expectedWindowType); - if (!expectedCustomFlags) // We expect the same as 'customFlags' + + if (!expectedCustomFlags) { + // We expect the same as 'customFlags' QCOMPARE(window->windowFlags() & ~expectedWindowType, customFlags); - else + } else { + QEXPECT_FAIL("Qt::Widget", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Window", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Dialog", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Sheet", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Drawer", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Popup", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Tool", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::ToolTip", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::SplashScreen", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::Desktop", "QTBUG-27274", Continue); + QEXPECT_FAIL("Qt::SubWindow", "QTBUG-27274", Continue); + QEXPECT_FAIL("StandardAndFrameless", "QTBUG-27274", Continue); + QEXPECT_FAIL("StandardAndFramelessAndStaysOnTop", "QTBUG-27274", Continue); + QEXPECT_FAIL("Shade", "QTBUG-27274", Continue); + QEXPECT_FAIL("Context", "QTBUG-27274", Continue); + QEXPECT_FAIL("ShadeAndContext", "QTBUG-27274", Continue); QCOMPARE(window->windowFlags() & ~expectedWindowType, expectedCustomFlags); - + } } void tst_QMdiSubWindow::mouseDoubleClick() @@ -951,7 +978,6 @@ void tst_QMdiSubWindow::mouseDoubleClick() QCOMPARE(window->geometry(), originalGeometry); // With Qt::WindowShadeButtonHint flag set - QSKIP("Until we have a QEvent::WindowFlagsChange event, this will skip"); window->setWindowFlags(window->windowFlags() | Qt::WindowShadeButtonHint); QVERIFY(window->windowFlags() & Qt::WindowShadeButtonHint); originalGeometry = window->geometry(); @@ -962,12 +988,18 @@ void tst_QMdiSubWindow::mouseDoubleClick() sendMouseDoubleClick(window, mousePosition); qApp->processEvents(); QVERIFY(!window->isShaded()); +#ifndef Q_OS_MAC + QEXPECT_FAIL("", "QTBUG-27274", Continue); +#endif QCOMPARE(window->geometry(), originalGeometry); window->showMinimized(); QVERIFY(window->isMinimized()); sendMouseDoubleClick(window, mousePosition); QVERIFY(!window->isMinimized()); +#ifndef Q_OS_MAC + QEXPECT_FAIL("", "QTBUG-27274", Continue); +#endif QCOMPARE(window->geometry(), originalGeometry); } -- 2.7.4