Skip to content
GitLab
Menu
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
d78d6866
Commit
d78d6866
authored
May 12, 2021
by
Vlad Zahorodnii
Browse files
autotests: Stabilize ActivationTest::testSwitchToWindowMaximized
parent
8e63bd23
Changes
1
Hide whitespace changes
Inline
Side-by-side
autotests/integration/activation_test.cpp
View file @
d78d6866
...
...
@@ -362,13 +362,12 @@ void ActivationTest::testSwitchToWindowMaximized()
// Create several maximized clients on the left screen.
QScopedPointer
<
Surface
>
surface1
(
Test
::
createSurface
());
QScopedPointer
<
Test
::
XdgToplevel
>
shellSurface1
(
Test
::
createXdgToplevelSurface
(
surface1
.
data
()));
QSignalSpy
toplevelConfigureRequestedSpy1
(
shellSurface1
.
data
(),
&
Test
::
XdgToplevel
::
configureRequested
);
QSignalSpy
surfaceConfigureRequestedSpy1
(
shellSurface1
->
xdgSurface
(),
&
Test
::
XdgSurface
::
configureRequested
);
AbstractClient
*
client1
=
Test
::
renderAndWaitForShown
(
surface1
.
data
(),
QSize
(
100
,
50
),
Qt
::
blue
);
QVERIFY
(
client1
);
QVERIFY
(
client1
->
isActive
());
QSignalSpy
toplevelConfigureRequestedSpy1
(
shellSurface1
.
data
(),
&
Test
::
XdgToplevel
::
configureRequested
);
QVERIFY
(
toplevelConfigureRequestedSpy1
.
isValid
());
QSignalSpy
surfaceConfigureRequestedSpy1
(
shellSurface1
->
xdgSurface
(),
&
Test
::
XdgSurface
::
configureRequested
);
QVERIFY
(
surfaceConfigureRequestedSpy1
.
isValid
());
QVERIFY
(
surfaceConfigureRequestedSpy1
.
wait
());
// Wait for the configure event with the activated state.
workspace
()
->
slotWindowMaximize
();
QVERIFY
(
surfaceConfigureRequestedSpy1
.
wait
());
QSignalSpy
frameGeometryChangedSpy1
(
client1
,
&
AbstractClient
::
frameGeometryChanged
);
...
...
@@ -379,13 +378,12 @@ void ActivationTest::testSwitchToWindowMaximized()
QScopedPointer
<
Surface
>
surface2
(
Test
::
createSurface
());
QScopedPointer
<
Test
::
XdgToplevel
>
shellSurface2
(
Test
::
createXdgToplevelSurface
(
surface2
.
data
()));
QSignalSpy
toplevelConfigureRequestedSpy2
(
shellSurface2
.
data
(),
&
Test
::
XdgToplevel
::
configureRequested
);
QSignalSpy
surfaceConfigureRequestedSpy2
(
shellSurface2
->
xdgSurface
(),
&
Test
::
XdgSurface
::
configureRequested
);
AbstractClient
*
client2
=
Test
::
renderAndWaitForShown
(
surface2
.
data
(),
QSize
(
100
,
50
),
Qt
::
blue
);
QVERIFY
(
client2
);
QVERIFY
(
client2
->
isActive
());
QSignalSpy
toplevelConfigureRequestedSpy2
(
shellSurface2
.
data
(),
&
Test
::
XdgToplevel
::
configureRequested
);
QVERIFY
(
toplevelConfigureRequestedSpy2
.
wait
());
QSignalSpy
surfaceConfigureRequestedSpy2
(
shellSurface2
->
xdgSurface
(),
&
Test
::
XdgSurface
::
configureRequested
);
QVERIFY
(
surfaceConfigureRequestedSpy2
.
isValid
());
QVERIFY
(
surfaceConfigureRequestedSpy2
.
wait
());
// Wait for the configure event with the activated state.
workspace
()
->
slotWindowMaximize
();
QVERIFY
(
surfaceConfigureRequestedSpy2
.
wait
());
QSignalSpy
frameGeometryChangedSpy2
(
client2
,
&
AbstractClient
::
frameGeometryChanged
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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