Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/internal_window.cpp
Show First 20 Lines • Show All 532 Lines • ▼ Show 20 Line(s) | 525 | { | |||
---|---|---|---|---|---|
533 | QCOMPARE(clientAddedSpy.count(), 1); | 533 | QCOMPARE(clientAddedSpy.count(), 1); | ||
534 | auto internalClient = clientAddedSpy.first().first().value<ShellClient*>(); | 534 | auto internalClient = clientAddedSpy.first().first().value<ShellClient*>(); | ||
535 | QVERIFY(internalClient); | 535 | QVERIFY(internalClient); | ||
536 | QCOMPARE(internalClient->geometry(), QRect(0, 0, 100, 100)); | 536 | QCOMPARE(internalClient->geometry(), QRect(0, 0, 100, 100)); | ||
537 | 537 | | |||
538 | // normal move should be synced | 538 | // normal move should be synced | ||
539 | internalClient->move(5, 10); | 539 | internalClient->move(5, 10); | ||
540 | QCOMPARE(internalClient->geometry(), QRect(5, 10, 100, 100)); | 540 | QCOMPARE(internalClient->geometry(), QRect(5, 10, 100, 100)); | ||
541 | QCOMPARE(win.geometry(), QRect(5, 10, 100, 100)); | 541 | QTRY_COMPARE(win.geometry(), QRect(5, 10, 100, 100)); | ||
542 | // another move should also be synced | 542 | // another move should also be synced | ||
543 | internalClient->move(10, 20); | 543 | internalClient->move(10, 20); | ||
544 | QCOMPARE(internalClient->geometry(), QRect(10, 20, 100, 100)); | 544 | QCOMPARE(internalClient->geometry(), QRect(10, 20, 100, 100)); | ||
545 | QCOMPARE(win.geometry(), QRect(10, 20, 100, 100)); | 545 | QTRY_COMPARE(win.geometry(), QRect(10, 20, 100, 100)); | ||
546 | 546 | | |||
547 | // now move with a Geometry update blocker | 547 | // now move with a Geometry update blocker | ||
548 | { | 548 | { | ||
549 | GeometryUpdatesBlocker blocker(internalClient); | 549 | GeometryUpdatesBlocker blocker(internalClient); | ||
550 | internalClient->move(5, 10); | 550 | internalClient->move(5, 10); | ||
551 | // not synced! | 551 | // not synced! | ||
552 | QCOMPARE(win.geometry(), QRect(10, 20, 100, 100)); | 552 | QCOMPARE(win.geometry(), QRect(10, 20, 100, 100)); | ||
553 | } | 553 | } | ||
554 | // after destroying the blocker it should be synced | 554 | // after destroying the blocker it should be synced | ||
555 | QCOMPARE(win.geometry(), QRect(5, 10, 100, 100)); | 555 | QTRY_COMPARE(win.geometry(), QRect(5, 10, 100, 100)); | ||
556 | } | 556 | } | ||
557 | 557 | | |||
558 | void InternalWindowTest::testSkipCloseAnimation_data() | 558 | void InternalWindowTest::testSkipCloseAnimation_data() | ||
559 | { | 559 | { | ||
560 | QTest::addColumn<bool>("initial"); | 560 | QTest::addColumn<bool>("initial"); | ||
561 | 561 | | |||
562 | QTest::newRow("set") << true; | 562 | QTest::newRow("set") << true; | ||
563 | QTest::newRow("not set") << false; | 563 | QTest::newRow("not set") << false; | ||
Show All 31 Lines |