test: Mark tst_QMdiSubWindow failures as XFAIL
authorSergio Ahumada <sergio.ahumada@digia.com>
Wed, 19 Sep 2012 13:45:13 +0000 (15:45 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 25 Sep 2012 18:28:06 +0000 (20:28 +0200)
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 <caroline.chao@digia.com>
tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp

index 8877be6..77a3dd5 100644 (file)
@@ -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);
 }