diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-28 09:50:48 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-10-23 17:46:14 +0000 |
commit | dadaa47844f36ba2e598a1d44cfff0cb16384510 (patch) | |
tree | 23a5373f803c37df56d261d75f457173e21ac571 /tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | |
parent | e42b2e8d4922a5942839850d0b031fcb19521545 (diff) |
skip part of tst_qquickwindow::testWindowVisibilityOrder on Unity
It's flaky: on the CI machines, the first three windows are shown
stacked on top of each other, and none of them has focus, because
the terminal which is running the tests continues to have focus.
If this happened to a user, he would just click in whichever window
he wants to have focus. (Good thing it's visible, at least.)
So this looks like broken window manager behavior. Ubuntu will switch
to Gnome soon anyway; then maybe the behavior will be different.
Task-number: QTBUG-62604
Change-Id: Id0db8a61e8335e7f591a38e07c488c055b236239
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickwindow/tst_qquickwindow.cpp')
-rw-r--r-- | tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index da1373e11b..d358383ecb 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -1887,10 +1887,15 @@ void tst_qquickwindow::testWindowVisibilityOrder() QWindowList windows = QGuiApplication::topLevelWindows(); QTRY_COMPARE(windows.size(), 5); - QCOMPARE(window3, QGuiApplication::focusWindow()); - QVERIFY(window1->isActive()); - QVERIFY(window2->isActive()); - QVERIFY(window3->isActive()); + if (qgetenv("XDG_CURRENT_DESKTOP") == "Unity" && QGuiApplication::focusWindow() != window3) { + qDebug() << "Unity (flaky QTBUG-62604): expected window3 to have focus; actual focusWindow:" + << QGuiApplication::focusWindow(); + } else { + QCOMPARE(window3, QGuiApplication::focusWindow()); + QVERIFY(window1->isActive()); + QVERIFY(window2->isActive()); + QVERIFY(window3->isActive()); + } //Test if window4 is shown 2 seconds after the application startup //with window4 visible window5 (transient child) should also become visible |