Review Request 115190: Add unit test for KWindowInfo on X11

Martin Gräßlin mgraesslin at kde.org
Tue Jan 21 17:41:14 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115190/
-----------------------------------------------------------

Review request for KDE Frameworks and Ben Cooksley.


Repository: kwindowsystem


Description
-------

Add unit test for KWindowInfo on X11

Unit test for most methods provided by KWindowInfo. The general pattern
is to create a window, show it, test the property, change it and
verify that the change worked. This is a little bit tricky as the test
needs to interact with large parts of the window manager. In case a
property is updated by the window manager we need to send the client
message, wait till the window manager has reacted on it and updated
the property and then wait for the property update. This is mostly done
by waiting for the signal KWindowSystem::windowChanged. Unfortunately
that reports globally and not just for the window we are interested in.
So we have to filter out till we got the correct one. If there is at
the same time further interaction with the windowing system tests can
fail, but a re-run normally fixes it.

The unit test is so far written against KWin. It's possible that it
needs adjustments for succeeding on build.kde.org. Given that
KWindowInfo::actionSupported is not tested as that is clearly to
specific to the used window manager.

---

@Ben: is it possible that you try the patch on build.kde.org while it's under review, so that I can fix any possible failures.


Diffs
-----

  autotests/CMakeLists.txt 58803aec9c807f68ff2bac227d0d9cf0305fa1f6 
  autotests/kwindowinfox11test.cpp PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/115190/diff/


Testing
-------


Thanks,

Martin Gräßlin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140121/7907d62f/attachment.html>


More information about the Kde-frameworks-devel mailing list