autotests: Make testX11Window quicker
Before Executed in 17.39 secs fish external usr time 422.91 millis 1.92 millis 420.99 millis sys time 586.41 millis 0.22 millis 586.19 millis After Executed in 1.23 secs fish external usr time 395.63 millis 0.00 millis 395.63 millis sys time 228.55 millis 2.13 millis 226.42 millis
This commit is contained in:
parent
e689ab5ebd
commit
f04ad754ce
1 changed files with 8 additions and 8 deletions
|
@ -144,14 +144,14 @@ void X11WindowTest::testMinimumSize()
|
||||||
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
||||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(-8, 0));
|
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(-8, 0));
|
||||||
QCOMPARE(clientStepUserMovedResizedSpy.count(), 0);
|
QCOMPARE(clientStepUserMovedResizedSpy.count(), 0);
|
||||||
QVERIFY(!frameGeometryChangedSpy.wait(1000));
|
QVERIFY(!frameGeometryChangedSpy.wait(10));
|
||||||
QCOMPARE(window->clientSize().width(), 100 / scale);
|
QCOMPARE(window->clientSize().width(), 100 / scale);
|
||||||
|
|
||||||
window->keyPressEvent(Qt::Key_Right);
|
window->keyPressEvent(Qt::Key_Right);
|
||||||
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
||||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos);
|
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos);
|
||||||
QCOMPARE(clientStepUserMovedResizedSpy.count(), 0);
|
QCOMPARE(clientStepUserMovedResizedSpy.count(), 0);
|
||||||
QVERIFY(!frameGeometryChangedSpy.wait(1000));
|
QVERIFY(!frameGeometryChangedSpy.wait(10));
|
||||||
QCOMPARE(window->clientSize().width(), 100 / scale);
|
QCOMPARE(window->clientSize().width(), 100 / scale);
|
||||||
|
|
||||||
window->keyPressEvent(Qt::Key_Right);
|
window->keyPressEvent(Qt::Key_Right);
|
||||||
|
@ -166,14 +166,14 @@ void X11WindowTest::testMinimumSize()
|
||||||
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
||||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(8, -8));
|
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(8, -8));
|
||||||
QCOMPARE(clientStepUserMovedResizedSpy.count(), 1);
|
QCOMPARE(clientStepUserMovedResizedSpy.count(), 1);
|
||||||
QVERIFY(!frameGeometryChangedSpy.wait(1000));
|
QVERIFY(!frameGeometryChangedSpy.wait(10));
|
||||||
QCOMPARE(window->clientSize().height(), 200 / scale);
|
QCOMPARE(window->clientSize().height(), 200 / scale);
|
||||||
|
|
||||||
window->keyPressEvent(Qt::Key_Down);
|
window->keyPressEvent(Qt::Key_Down);
|
||||||
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
||||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(8, 0));
|
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(8, 0));
|
||||||
QCOMPARE(clientStepUserMovedResizedSpy.count(), 1);
|
QCOMPARE(clientStepUserMovedResizedSpy.count(), 1);
|
||||||
QVERIFY(!frameGeometryChangedSpy.wait(1000));
|
QVERIFY(!frameGeometryChangedSpy.wait(10));
|
||||||
QCOMPARE(window->clientSize().height(), 200 / scale);
|
QCOMPARE(window->clientSize().height(), 200 / scale);
|
||||||
|
|
||||||
window->keyPressEvent(Qt::Key_Down);
|
window->keyPressEvent(Qt::Key_Down);
|
||||||
|
@ -250,13 +250,13 @@ void X11WindowTest::testMaximumSize()
|
||||||
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
||||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(8, 0));
|
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(8, 0));
|
||||||
QCOMPARE(clientStepUserMovedResizedSpy.count(), 0);
|
QCOMPARE(clientStepUserMovedResizedSpy.count(), 0);
|
||||||
QVERIFY(!frameGeometryChangedSpy.wait(1000));
|
QVERIFY(!frameGeometryChangedSpy.wait(10));
|
||||||
QCOMPARE(window->clientSize().width(), 100 / scale);
|
QCOMPARE(window->clientSize().width(), 100 / scale);
|
||||||
|
|
||||||
window->keyPressEvent(Qt::Key_Left);
|
window->keyPressEvent(Qt::Key_Left);
|
||||||
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
||||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos);
|
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos);
|
||||||
QVERIFY(!clientStepUserMovedResizedSpy.wait(1000));
|
QVERIFY(!clientStepUserMovedResizedSpy.wait(10));
|
||||||
QCOMPARE(clientStepUserMovedResizedSpy.count(), 0);
|
QCOMPARE(clientStepUserMovedResizedSpy.count(), 0);
|
||||||
QCOMPARE(window->clientSize().width(), 100 / scale);
|
QCOMPARE(window->clientSize().width(), 100 / scale);
|
||||||
|
|
||||||
|
@ -271,14 +271,14 @@ void X11WindowTest::testMaximumSize()
|
||||||
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
||||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(-8, 8));
|
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(-8, 8));
|
||||||
QCOMPARE(clientStepUserMovedResizedSpy.count(), 1);
|
QCOMPARE(clientStepUserMovedResizedSpy.count(), 1);
|
||||||
QVERIFY(!frameGeometryChangedSpy.wait(1000));
|
QVERIFY(!frameGeometryChangedSpy.wait(10));
|
||||||
QCOMPARE(window->clientSize().height(), 200 / scale);
|
QCOMPARE(window->clientSize().height(), 200 / scale);
|
||||||
|
|
||||||
window->keyPressEvent(Qt::Key_Up);
|
window->keyPressEvent(Qt::Key_Up);
|
||||||
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
window->updateInteractiveMoveResize(KWin::Cursors::self()->mouse()->pos());
|
||||||
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(-8, 0));
|
QCOMPARE(KWin::Cursors::self()->mouse()->pos(), cursorPos + QPoint(-8, 0));
|
||||||
QCOMPARE(clientStepUserMovedResizedSpy.count(), 1);
|
QCOMPARE(clientStepUserMovedResizedSpy.count(), 1);
|
||||||
QVERIFY(!frameGeometryChangedSpy.wait(1000));
|
QVERIFY(!frameGeometryChangedSpy.wait(10));
|
||||||
QCOMPARE(window->clientSize().height(), 200 / scale);
|
QCOMPARE(window->clientSize().height(), 200 / scale);
|
||||||
|
|
||||||
window->keyPressEvent(Qt::Key_Up);
|
window->keyPressEvent(Qt::Key_Up);
|
||||||
|
|
Loading…
Reference in a new issue