summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-06-17 09:54:46 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-25 09:29:21 +0200
commit63601509f89f250b7768f79d42b22f95eb1b4c4c (patch)
tree343c30a3739cdd6f3c64124cd805da60a51844a5 /tests
parent5e4627fb852d13b57659a0889a65a177206be2cc (diff)
Test for activation and palette on QWindowContainer's parent
Task-number: QTBUG-31775 Change-Id: Ib8ec5508f7bf53f9e3ce502367a3dca1a760289f Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
index 440639cd49..2d9cb98e27 100644
--- a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
+++ b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp
@@ -192,6 +192,11 @@ void tst_QWindowContainer::testActivation()
QVERIFY(QTest::qWaitForWindowActive(root.windowHandle()));
QVERIFY(QGuiApplication::focusWindow() == root.windowHandle());
+ // Verify that all states in the root widget indicate it is active
+ QVERIFY(root.windowHandle()->isActive());
+ QVERIFY(root.isActiveWindow());
+ QCOMPARE(root.palette().currentColorGroup(), QPalette::Active);
+
// Under KDE (ubuntu 12.10), we experience that doing two activateWindow in a row
// does not work. The second gets ignored by the window manager, even though the
// timestamp in the xcb connection is unique for both.
@@ -201,6 +206,11 @@ void tst_QWindowContainer::testActivation()
window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
+
+ // Verify that all states in the root widget still indicate it is active
+ QVERIFY(root.windowHandle()->isActive());
+ QVERIFY(root.isActiveWindow());
+ QCOMPARE(root.palette().currentColorGroup(), QPalette::Active);
}