Fix test after OutputInterface: Initialize output in Off state
ctest passes again
This commit is contained in:
parent
15dd855ef9
commit
0e70af208c
1 changed files with 6 additions and 6 deletions
|
@ -83,7 +83,7 @@ void TestWaylandOutput::init()
|
||||||
QCOMPARE(m_serverOutput->refreshRate(), 60000);
|
QCOMPARE(m_serverOutput->refreshRate(), 60000);
|
||||||
m_serverOutput->create();
|
m_serverOutput->create();
|
||||||
QCOMPARE(m_serverOutput->isDpmsSupported(), false);
|
QCOMPARE(m_serverOutput->isDpmsSupported(), false);
|
||||||
QCOMPARE(m_serverOutput->dpmsMode(), OutputInterface::DpmsMode::On);
|
QCOMPARE(m_serverOutput->dpmsMode(), OutputInterface::DpmsMode::Off);
|
||||||
|
|
||||||
// setup connection
|
// setup connection
|
||||||
m_connection = new KWayland::Client::ConnectionThread;
|
m_connection = new KWayland::Client::ConnectionThread;
|
||||||
|
@ -469,7 +469,7 @@ void TestWaylandOutput::testDpms_data()
|
||||||
|
|
||||||
QTest::newRow("Standby") << Dpms::Mode::Standby << OutputInterface::DpmsMode::Standby;
|
QTest::newRow("Standby") << Dpms::Mode::Standby << OutputInterface::DpmsMode::Standby;
|
||||||
QTest::newRow("Suspend") << Dpms::Mode::Suspend << OutputInterface::DpmsMode::Suspend;
|
QTest::newRow("Suspend") << Dpms::Mode::Suspend << OutputInterface::DpmsMode::Suspend;
|
||||||
QTest::newRow("Off") << Dpms::Mode::Off << OutputInterface::DpmsMode::Off;
|
QTest::newRow("On") << Dpms::Mode::On << OutputInterface::DpmsMode::On;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestWaylandOutput::testDpms()
|
void TestWaylandOutput::testDpms()
|
||||||
|
@ -522,7 +522,7 @@ void TestWaylandOutput::testDpms()
|
||||||
QSignalSpy clientDpmsModeChangedSpy(dpms, &Dpms::modeChanged);
|
QSignalSpy clientDpmsModeChangedSpy(dpms, &Dpms::modeChanged);
|
||||||
QVERIFY(clientDpmsModeChangedSpy.isValid());
|
QVERIFY(clientDpmsModeChangedSpy.isValid());
|
||||||
|
|
||||||
QCOMPARE(m_serverOutput->dpmsMode(), OutputInterface::DpmsMode::On);
|
QCOMPARE(m_serverOutput->dpmsMode(), OutputInterface::DpmsMode::Off);
|
||||||
QFETCH(OutputInterface::DpmsMode, server);
|
QFETCH(OutputInterface::DpmsMode, server);
|
||||||
m_serverOutput->setDpmsMode(server);
|
m_serverOutput->setDpmsMode(server);
|
||||||
QCOMPARE(m_serverOutput->dpmsMode(), server);
|
QCOMPARE(m_serverOutput->dpmsMode(), server);
|
||||||
|
@ -544,11 +544,11 @@ void TestWaylandOutput::testDpms()
|
||||||
QCOMPARE(supportedChangedSpy.count(), 2);
|
QCOMPARE(supportedChangedSpy.count(), 2);
|
||||||
QVERIFY(dpms->isSupported());
|
QVERIFY(dpms->isSupported());
|
||||||
|
|
||||||
// and switch back to on
|
// and switch back to off
|
||||||
m_serverOutput->setDpmsMode(OutputInterface::DpmsMode::On);
|
m_serverOutput->setDpmsMode(OutputInterface::DpmsMode::Off);
|
||||||
QVERIFY(clientDpmsModeChangedSpy.wait());
|
QVERIFY(clientDpmsModeChangedSpy.wait());
|
||||||
QCOMPARE(clientDpmsModeChangedSpy.count(), 2);
|
QCOMPARE(clientDpmsModeChangedSpy.count(), 2);
|
||||||
QCOMPARE(dpms->mode(), Dpms::Mode::On);
|
QCOMPARE(dpms->mode(), Dpms::Mode::Off);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestWaylandOutput::testDpmsRequestMode_data()
|
void TestWaylandOutput::testDpmsRequestMode_data()
|
||||||
|
|
Loading…
Reference in a new issue