mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
tests/monitor-unit-tests: Disambiguate external monitor in lid switch test
The external and internal monitor in the lid switch test had the identical EDID information. This is at odds with the change to ignore the connector if possible, as each of the monitors can be present independently. Avoid the problem by updating the test and setting a different serial number in the EDID data of the external monitor. https://gitlab.gnome.org/GNOME/mutter/issues/932
This commit is contained in:
parent
2f2efdefcf
commit
c85643a0f7
@ -30,7 +30,7 @@
|
|||||||
<connector>DP-1</connector>
|
<connector>DP-1</connector>
|
||||||
<vendor>MetaProduct's Inc.</vendor>
|
<vendor>MetaProduct's Inc.</vendor>
|
||||||
<product>MetaMonitor</product>
|
<product>MetaMonitor</product>
|
||||||
<serial>0x123456</serial>
|
<serial>0x654321</serial>
|
||||||
</monitorspec>
|
</monitorspec>
|
||||||
<mode>
|
<mode>
|
||||||
<width>1024</width>
|
<width>1024</width>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<connector>DP-1</connector>
|
<connector>DP-1</connector>
|
||||||
<vendor>MetaProduct's Inc.</vendor>
|
<vendor>MetaProduct's Inc.</vendor>
|
||||||
<product>MetaMonitor</product>
|
<product>MetaMonitor</product>
|
||||||
<serial>0x123456</serial>
|
<serial>0x654321</serial>
|
||||||
</monitorspec>
|
</monitorspec>
|
||||||
<mode>
|
<mode>
|
||||||
<width>1024</width>
|
<width>1024</width>
|
||||||
|
@ -5310,6 +5310,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
|||||||
.crtc = -1,
|
.crtc = -1,
|
||||||
.modes = { 0 },
|
.modes = { 0 },
|
||||||
.n_modes = 1,
|
.n_modes = 1,
|
||||||
|
.serial = "0x654321",
|
||||||
.preferred_mode = 0,
|
.preferred_mode = 0,
|
||||||
.possible_crtcs = { 1 },
|
.possible_crtcs = { 1 },
|
||||||
.n_possible_crtcs = 1,
|
.n_possible_crtcs = 1,
|
||||||
@ -5410,6 +5411,8 @@ meta_test_monitor_custom_lid_switch_config (void)
|
|||||||
MetaMonitorTestSetup *test_setup;
|
MetaMonitorTestSetup *test_setup;
|
||||||
MetaBackend *backend = meta_get_backend ();
|
MetaBackend *backend = meta_get_backend ();
|
||||||
|
|
||||||
|
g_debug ("Initial configuration (only internal screen)");
|
||||||
|
|
||||||
test_setup = create_monitor_test_setup (&test_case,
|
test_setup = create_monitor_test_setup (&test_case,
|
||||||
MONITOR_TEST_FLAG_NONE);
|
MONITOR_TEST_FLAG_NONE);
|
||||||
set_custom_monitor_config ("lid-switch.xml");
|
set_custom_monitor_config ("lid-switch.xml");
|
||||||
@ -5417,6 +5420,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
|||||||
check_monitor_configuration (&test_case);
|
check_monitor_configuration (&test_case);
|
||||||
|
|
||||||
/* External monitor connected */
|
/* External monitor connected */
|
||||||
|
g_debug ("External monitor connected");
|
||||||
|
|
||||||
test_case.setup.n_outputs = 2;
|
test_case.setup.n_outputs = 2;
|
||||||
test_case.expect.n_monitors = 2;
|
test_case.expect.n_monitors = 2;
|
||||||
@ -5437,6 +5441,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
|||||||
check_monitor_configuration (&test_case);
|
check_monitor_configuration (&test_case);
|
||||||
|
|
||||||
/* Lid was closed */
|
/* Lid was closed */
|
||||||
|
g_debug ("Closing lid");
|
||||||
|
|
||||||
test_case.expect.crtcs[0].current_mode = -1;
|
test_case.expect.crtcs[0].current_mode = -1;
|
||||||
test_case.expect.crtcs[1].transform = META_MONITOR_TRANSFORM_90;
|
test_case.expect.crtcs[1].transform = META_MONITOR_TRANSFORM_90;
|
||||||
@ -5455,6 +5460,7 @@ meta_test_monitor_custom_lid_switch_config (void)
|
|||||||
check_monitor_configuration (&test_case);
|
check_monitor_configuration (&test_case);
|
||||||
|
|
||||||
/* Lid was opened */
|
/* Lid was opened */
|
||||||
|
g_debug ("Opening lid");
|
||||||
|
|
||||||
test_case.expect.crtcs[0].current_mode = 0;
|
test_case.expect.crtcs[0].current_mode = 0;
|
||||||
test_case.expect.crtcs[0].transform = META_MONITOR_TRANSFORM_NORMAL;
|
test_case.expect.crtcs[0].transform = META_MONITOR_TRANSFORM_NORMAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user