[autotests/wayland] Try to make PointerInputTest::testMouseActionActiveWindow more robust
It's currently failing on build.kde.org. I'm not able to reproduce the failure localy so I can only interpret the failure. The failure looks like a window is still present in the next executed test case thus breaking the positioning. This change ensures that the window is properly gone before going into the next test case.
This commit is contained in:
parent
54d770d5ca
commit
ee785db147
1 changed files with 9 additions and 0 deletions
|
@ -740,6 +740,8 @@ void PointerInputTest::testMouseActionActiveWindow()
|
|||
QVERIFY(clientAddedSpy.wait());
|
||||
AbstractClient *window1 = workspace()->activeClient();
|
||||
QVERIFY(window1);
|
||||
QSignalSpy window1DestroyedSpy(window1, &QObject::destroyed);
|
||||
QVERIFY(window1DestroyedSpy.isValid());
|
||||
Surface *surface2 = m_compositor->createSurface(m_compositor);
|
||||
QVERIFY(surface2);
|
||||
ShellSurface *shellSurface2 = m_shell->createSurface(surface2, surface2);
|
||||
|
@ -749,6 +751,8 @@ void PointerInputTest::testMouseActionActiveWindow()
|
|||
AbstractClient *window2 = workspace()->activeClient();
|
||||
QVERIFY(window2);
|
||||
QVERIFY(window1 != window2);
|
||||
QSignalSpy window2DestroyedSpy(window2, &QObject::destroyed);
|
||||
QVERIFY(window2DestroyedSpy.isValid());
|
||||
QCOMPARE(workspace()->topClientOnDesktop(1, -1), window2);
|
||||
// geometry of the two windows should be overlapping
|
||||
QVERIFY(window1->geometry().intersects(window2->geometry()));
|
||||
|
@ -781,6 +785,11 @@ void PointerInputTest::testMouseActionActiveWindow()
|
|||
|
||||
// release again
|
||||
waylandServer()->backend()->pointerButtonReleased(button, timestamp++);
|
||||
|
||||
delete surface1;
|
||||
QVERIFY(window1DestroyedSpy.wait());
|
||||
delete surface2;
|
||||
QVERIFY(window2DestroyedSpy.wait());
|
||||
}
|
||||
|
||||
void PointerInputTest::testCursorImage()
|
||||
|
|
Loading…
Reference in a new issue