~smspillaz/compiz-core/compiz-core.fix_930071

Viewing all changes in revision 2987.

There's a lot of refactoring that makes it possible to get PrivateScreen under test. The inital purpose was to get "updatePlugins" under test.

To do this it was necessary to start disentagling the CompScreen interface used by much of the code from the implementation - the result is a CompScreenImpl object that has the actual functionality.

Significantly, it is now possible to mock CompScreen - and a couple of tests for PrivateScreen::updatePlugins are added.

These tests highlight a number of issues with initialisation and cleanup which will be addressed later. But it's probably good to make the refactoring work available for comment sooner rather than later.

I realise that these tests are far from "unit tests" but the interface to PrivateScreen is messy, involving globals, and dependencies on public state. (And at least they don't hit the filesystem.)

Merged from lp:~alan-griffiths/compiz-core/test-PrivateScreen-updatePlugins

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: