Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
0e70af20
Commit
0e70af20
authored
May 19, 2020
by
Méven Car
Browse files
Fix test after OutputInterface: Initialize output in Off state
ctest passes again
parent
15dd855e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wayland/autotests/client/test_wayland_output.cpp
View file @
0e70af20
...
...
@@ -83,7 +83,7 @@ void TestWaylandOutput::init()
QCOMPARE
(
m_serverOutput
->
refreshRate
(),
60000
);
m_serverOutput
->
create
();
QCOMPARE
(
m_serverOutput
->
isDpmsSupported
(),
false
);
QCOMPARE
(
m_serverOutput
->
dpmsMode
(),
OutputInterface
::
DpmsMode
::
O
n
);
QCOMPARE
(
m_serverOutput
->
dpmsMode
(),
OutputInterface
::
DpmsMode
::
O
ff
);
// setup connection
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
(
"Suspend"
)
<<
Dpms
::
Mode
::
Suspend
<<
OutputInterface
::
DpmsMode
::
Suspend
;
QTest
::
newRow
(
"O
ff
"
)
<<
Dpms
::
Mode
::
O
ff
<<
OutputInterface
::
DpmsMode
::
O
ff
;
QTest
::
newRow
(
"O
n
"
)
<<
Dpms
::
Mode
::
O
n
<<
OutputInterface
::
DpmsMode
::
O
n
;
}
void
TestWaylandOutput
::
testDpms
()
...
...
@@ -522,7 +522,7 @@ void TestWaylandOutput::testDpms()
QSignalSpy
clientDpmsModeChangedSpy
(
dpms
,
&
Dpms
::
modeChanged
);
QVERIFY
(
clientDpmsModeChangedSpy
.
isValid
());
QCOMPARE
(
m_serverOutput
->
dpmsMode
(),
OutputInterface
::
DpmsMode
::
O
n
);
QCOMPARE
(
m_serverOutput
->
dpmsMode
(),
OutputInterface
::
DpmsMode
::
O
ff
);
QFETCH
(
OutputInterface
::
DpmsMode
,
server
);
m_serverOutput
->
setDpmsMode
(
server
);
QCOMPARE
(
m_serverOutput
->
dpmsMode
(),
server
);
...
...
@@ -544,11 +544,11 @@ void TestWaylandOutput::testDpms()
QCOMPARE
(
supportedChangedSpy
.
count
(),
2
);
QVERIFY
(
dpms
->
isSupported
());
// and switch back to o
n
m_serverOutput
->
setDpmsMode
(
OutputInterface
::
DpmsMode
::
O
n
);
// and switch back to o
ff
m_serverOutput
->
setDpmsMode
(
OutputInterface
::
DpmsMode
::
O
ff
);
QVERIFY
(
clientDpmsModeChangedSpy
.
wait
());
QCOMPARE
(
clientDpmsModeChangedSpy
.
count
(),
2
);
QCOMPARE
(
dpms
->
mode
(),
Dpms
::
Mode
::
O
n
);
QCOMPARE
(
dpms
->
mode
(),
Dpms
::
Mode
::
O
ff
);
}
void
TestWaylandOutput
::
testDpmsRequestMode_data
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment