Review Request 115190: Add unit test for KWindowInfo on X11

Martin Gräßlin mgraesslin at kde.org
Wed Jan 22 07:14:46 UTC 2014


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

(Updated Jan. 22, 2014, 8:14 a.m.)


Review request for KDE Frameworks and Ben Cooksley.


Changes
-------

installed openbox and added some fixes:
* KWin specific behavior in some tests checked for that we are running KWin
* added some sleeps for the tests which fail if they are executed directly after each other


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 (updated)
-----

  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/20140122/7c77a816/attachment.html>


More information about the Kde-frameworks-devel mailing list