[mutter/benzea/ignore-monitor-connector: 189/189] tests/monitor-unit-tests: Add test to for ignoring connector IDs
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/benzea/ignore-monitor-connector: 189/189] tests/monitor-unit-tests: Add test to for ignoring connector IDs
- Date: Wed, 12 Feb 2020 13:04:29 +0000 (UTC)
commit e34b2188a1388c09672e93c621e4e9255dfc072b
Author: Benjamin Berg <bberg redhat com>
Date: Fri Dec 20 14:27:11 2019 +0100
tests/monitor-unit-tests: Add test to for ignoring connector IDs
In some cases the connector ID should be ignored. Add a flag to modify
the generated connector ID, and test whether the stored configuration
still applies with the changed IDs.
https://gitlab.gnome.org/GNOME/mutter/issues/932
src/tests/monitor-unit-tests.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c
index 683f366a3..125405867 100644
--- a/src/tests/monitor-unit-tests.c
+++ b/src/tests/monitor-unit-tests.c
@@ -89,7 +89,8 @@
typedef enum _MonitorTestFlag
{
MONITOR_TEST_FLAG_NONE,
- MONITOR_TEST_FLAG_NO_STORED
+ MONITOR_TEST_FLAG_NO_STORED,
+ MONITOR_TEST_FLAG_OFFSET_DP_CONNECTOR,
} MonitorTestFlag;
typedef struct _MonitorTestCaseMode
@@ -924,6 +925,9 @@ create_monitor_test_setup (MonitorTestCase *test_case,
else
hotplug_mode_update = FALSE;
+ if (flags & MONITOR_TEST_FLAG_OFFSET_DP_CONNECTOR)
+ n_normal_panels = 100;
+
test_setup = g_new0 (MetaMonitorTestSetup, 1);
test_setup->modes = NULL;
@@ -5279,6 +5283,15 @@ meta_test_monitor_custom_oneoff (void)
emulate_hotplug (test_setup);
check_monitor_configuration (&test_case);
+
+ /* Same test after hotplugging the monitor to a different port */
+ test_setup = create_monitor_test_setup (&test_case,
+ MONITOR_TEST_FLAG_NONE |
+ MONITOR_TEST_FLAG_OFFSET_DP_CONNECTOR);
+ set_custom_monitor_config ("oneoff.xml");
+ emulate_hotplug (test_setup);
+
+ check_monitor_configuration (&test_case);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]