Review Request 117995: [screenlocker] Add a unit test for KSldApp
David Edmundson
david at davidedmundson.co.uk
Thu May 8 15:21:55 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117995/#review57591
-----------------------------------------------------------
ksmserver/screenlocker/autotests/CMakeLists.txt
<https://git.reviewboard.kde.org/r/117995/#comment40055>
does running ctest in the build directory try to run this? We don't want that to happen.
Same for pointer grabber.
ksmserver/screenlocker/autotests/keyboardgrabber.cpp
<https://git.reviewboard.kde.org/r/117995/#comment40056>
add something like
/*
This app grabs the keyboard from X.
It is used from ksldtest to verify we report if grabbing failed when the lock is held by an external application.
*/
ksmserver/screenlocker/autotests/ksldtest.cpp
<https://git.reviewboard.kde.org/r/117995/#comment40054>
I'm not sure this is a good test to manipulate the internal state of the app we're testing.
ksld.doUnlock(); would be better as we get to test that part of ksld too.
It might need the grab part splitting out.
ksmserver/screenlocker/autotests/ksldtest.cpp
<https://git.reviewboard.kde.org/r/117995/#comment40053>
again?
- David Edmundson
On May 5, 2014, 11:32 a.m., Martin Gräßlin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117995/
> -----------------------------------------------------------
>
> (Updated May 5, 2014, 11:32 a.m.)
>
>
> Review request for Plasma and David Edmundson.
>
>
> Repository: plasma-workspace
>
>
> Description
> -------
>
> [screenlocker] Add a unit test for KSldApp
>
> The unit test so far only tests establishGrab. This is a little bit
> tricky as we need a different X Client which grabs pointer or keyboard
> to make establishGrab fail. For that two small helper applications are
> included which do nothing else than connecting to X and the one grabbing
> keyboard the other grabbing pointer.
>
> The applications are started from the test to get the keyboard/pointer
> grabbed which results in ::establishGrab to return false.
>
> What this test is not yet able to test is handling the sleep between two
> grab attemps.
>
>
> Diffs
> -----
>
> ksmserver/screenlocker/autotests/CMakeLists.txt ff95d9d031cdac32085e358e30b95a9e9a6fb7dc
> ksmserver/screenlocker/autotests/keyboardgrabber.cpp PRE-CREATION
> ksmserver/screenlocker/autotests/ksldtest.cpp PRE-CREATION
> ksmserver/screenlocker/autotests/pointergrabber.cpp PRE-CREATION
> ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be
>
> Diff: https://git.reviewboard.kde.org/r/117995/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Martin Gräßlin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140508/dda7c2e9/attachment-0001.html>
More information about the Plasma-devel
mailing list