1
0
Fork 0
Commit graph

79 commits

Author SHA1 Message Date
Jonas Ådahl
4652bde3d7 tests: Move monitor test helpers to a helper file
Both the monitor unit tests and monitor store unit tests will want to
check whether the config manager is used and set custom configuration
files.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
339340df34 tests: Add MetaMonitorConfigStore tests
Add tests that check that a XML configuration file results in correct
MetaMonitorsConfig objects.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
c9f18bfef3 monitor-unit-tests: Test headless mode
This tests only the monitor configuration and basic functionality. It
does not test anything related to window management and Wayland client
interaction.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
f45e7703ba monitor-unit-tests: Add lid-closed with no external monitor test case
Test that when the laptop lid is closed, but no external monitors are
connected, that we still have a mode set on the laptop panel.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
1ee0412177 monitor-unit-tests: Use g_assert_cmp* macros when suitable
Use the g_assert_cmp(int|uint|...) macros when comparing integers and
unsigned integers. This means that the mismatched numbers are printed
in the test report.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
81923410f6 monitor-unit-tests: Test starting with lid closed
Add a test case that checks that configuration works when the lid is
initialy closed then later opened. This test case is disabled when the
legacy configuration is used as it does not handle that situation.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
cde1a730e8 monitor-unit-tests: Add laptop lid switch test case
Test that the laptop panel is disabled if the lid is closed.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
8d1be7ffc0 monitor-unit-tests: Add test for handling too few CRTCs
Check that configuration when there are more outputs than CRTCs does
something sane.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
1a2b493d17 tests/monitor-unit-tests: Check current monitor mode
Check both that current mode is up to date, and that deriving it again
won't change it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
be13d0f8ee monitor: Allow monitor mode foreach crtc iterator failable
Allow the function used to iterate over the CRTC modes of a monitor
mode to fail, causing the iteration to fail as well.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
81438eebef monitor-unit-tests: Test suggested-x/y configuration
Test the suggested-x/y output state often set by virtual machines.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
63ed134165 monitor-unit-tests: Check monitor modes
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
ff633f295e logical-monitor: Don't duplicate output list
Just use the monitor list and the output lists of each monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
310064601c monitor-unit-tests: Check tiled monitor adding/removing notification
Check that the moniter manager backends get the tiled monitor
added/removed notification.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
4fa8b74dc7 monitor-unit-tests: Add musing about test declarations
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
f48acd8448 tests: Check that the crtc gets a logical monitor set
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
d0c9d2dc7b tests: Check that the monitors are properly generated
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
4e812410cc monitor-manager: Move logical monitor into its own file
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
0873e3812b backends: Rename MetaMonitorMode to MetaCrtcMode
The MetaMonitorMode referred to the mode of a CRTC, and with the future
introduction of a MetaMonitor, theh old name would be confusing.
Instead call it what it is.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
1650c35e38 monitor-manager: Rename MetaCRTC(Info) to MetaCrtc(Info)
Change to follow the naming convention used everywhere else. This means
changing CRTC to Crtc even though it is an abbreviation.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
156c478ccb tests/monitor: Add HiDPI test
This doesn't test the actual calculation, since that is done in the
backend, it only tests the configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
10e6eae0dd tests/monitor: Add tiled monitor test
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
8a8ab6c673 tests/monitor: Test preferred mode
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
9e28303588 tests/monitor: Test one out of two outputs being off
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
6776329cf5 tests/monitor: Test two crtcs, one output
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
d920eaba4a tests: Also make test case verification declarative
Set up the expected result in a declarative way in the same place as
the test case setup is declared. This way we have a completely
declarative way to create test cases.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
376a76a082 tests: Make monitor test case setup more declarative
In order to more easily create more test cases, make the test case
setup more declarative.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
c6d940d3b2 tests: Make monitor unit tests create initial config
This way we have both the test setup and testing in the same file.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
12150c1ca7 tests: Add basic monitor configuration tests
The added test checks that two monitors are lied out on a row next to
each other.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00