summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-03-05 10:44:04 +0100
committerLars Knoll <lars.knoll@nokia.com>2012-03-05 10:44:48 +0100
commitd51abed57a8f677a0d4eac57fd3f16bd4662190a (patch)
treeb3e173db4b72edbff6cb8dcc203c3d4526a1b51b /tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
parent07ae18f96e87a2db40ae014f28893f1080efa7ae (diff)
parent0862d7f78af978cf513097b3bdc33cd8096dee75 (diff)
Merge remote-tracking branch 'origin/master' into api_changes
Diffstat (limited to 'tests/auto/gui/kernel/qwindow/tst_qwindow.cpp')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 90c96b4030..f4556f7e32 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -64,6 +64,8 @@ private slots:
void touchCancelWithTouchToMouse();
void orientation();
void close();
+ void activateAndClose();
+
void initTestCase()
{
touchDevice = new QTouchDevice;
@@ -632,5 +634,16 @@ void tst_QWindow::close()
QVERIFY(b.close());
}
+void tst_QWindow::activateAndClose()
+{
+ for (int i = 0; i < 10; ++i) {
+ QWindow window;
+ window.show();
+ QTest::qWaitForWindowShown(&window);
+ window.requestActivateWindow();
+ QTRY_COMPARE(qGuiApp->focusWindow(), &window);
+ }
+}
+
#include <tst_qwindow.moc>
QTEST_MAIN(tst_QWindow);