summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index abd9604..65f4945 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -402,6 +402,7 @@ private slots:
void scrollWithoutBackingStore();
void taskQTBUG_7532_tabOrderWithFocusProxy();
+ void movedAndResizedAttributes();
private:
bool ensureScreenSize(int width, int height);
@@ -10040,5 +10041,61 @@ void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy()
// No Q_ASSERT, then it's allright.
}
+void tst_QWidget::movedAndResizedAttributes()
+{
+#if defined (Q_OS_MAC) || defined(Q_WS_QWS)
+ QEXPECT_FAIL("", "FixMe, QTBUG-8941", Abort);
+ QVERIFY(false);
+#else
+ QWidget w;
+ w.show();
+
+ QVERIFY(!w.testAttribute(Qt::WA_Moved));
+ QVERIFY(!w.testAttribute(Qt::WA_Resized));
+
+ w.setWindowState(Qt::WindowFullScreen);
+
+ QVERIFY(!w.testAttribute(Qt::WA_Moved));
+ QVERIFY(!w.testAttribute(Qt::WA_Resized));
+
+ w.setWindowState(Qt::WindowMaximized);
+
+ QVERIFY(!w.testAttribute(Qt::WA_Moved));
+ QVERIFY(!w.testAttribute(Qt::WA_Resized));
+
+ w.setWindowState(Qt::WindowMinimized);
+
+ QVERIFY(!w.testAttribute(Qt::WA_Moved));
+ QVERIFY(!w.testAttribute(Qt::WA_Resized));
+
+ w.showNormal();
+
+ QVERIFY(!w.testAttribute(Qt::WA_Moved));
+ QVERIFY(!w.testAttribute(Qt::WA_Resized));
+
+ w.showMaximized();
+
+ QVERIFY(!w.testAttribute(Qt::WA_Moved));
+ QVERIFY(!w.testAttribute(Qt::WA_Resized));
+
+ w.showFullScreen();
+
+ QVERIFY(!w.testAttribute(Qt::WA_Moved));
+ QVERIFY(!w.testAttribute(Qt::WA_Resized));
+
+ w.showNormal();
+ w.move(10,10);
+ QVERIFY(w.testAttribute(Qt::WA_Moved));
+#if defined(Q_OS_WIN)
+ QEXPECT_FAIL("", "FixMe, QTBUG-8911", Abort);
+#endif
+ QVERIFY(!w.testAttribute(Qt::WA_Resized));
+
+ w.resize(100, 100);
+ QVERIFY(w.testAttribute(Qt::WA_Moved));
+ QVERIFY(w.testAttribute(Qt::WA_Resized));
+#endif
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"