[mutter] monitor-unit-tests: Add non upright panel test
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-unit-tests: Add non upright panel test
- Date: Mon, 25 Dec 2017 09:07:59 +0000 (UTC)
commit 5eacdf7af771dffeb893e992a62ad2a3e8f7e414
Author: Hans de Goede <hdegoede redhat com>
Date: Thu Oct 26 11:50:10 2017 +0200
monitor-unit-tests: Add non upright panel test
https://bugzilla.gnome.org/show_bug.cgi?id=782294
src/tests/monitor-unit-tests.c | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c
index 0659a43..97b1e6e 100644
--- a/src/tests/monitor-unit-tests.c
+++ b/src/tests/monitor-unit-tests.c
@@ -3094,6 +3094,39 @@ meta_test_monitor_preferred_non_first_mode (void)
}
static void
+meta_test_monitor_non_upright_panel (void)
+{
+ MonitorTestCase test_case = initial_test_case;
+ MetaMonitorTestSetup *test_setup;
+
+ test_case.setup.modes[1] = (MonitorTestCaseMode) {
+ .width = 768,
+ .height = 1024,
+ .refresh_rate = 60.0,
+ };
+ test_case.setup.n_modes = 2;
+ test_case.setup.outputs[0].modes[0] = 1;
+ test_case.setup.outputs[0].preferred_mode = 1;
+ test_case.setup.outputs[0].panel_orientation_transform =
+ META_MONITOR_TRANSFORM_90;
+ /*
+ * Note we do not swap outputs[0].width_mm and height_mm, because these get
+ * swapped for rotated panels inside the xrandr / kms code and we directly
+ * create a dummy output here, skipping this code.
+ */
+ test_case.setup.crtcs[0].current_mode = 1;
+
+ test_case.expect.monitors[0].modes[0].crtc_modes[0].crtc_mode = 1;
+ test_case.expect.crtcs[0].current_mode = 1;
+ test_case.expect.crtcs[0].transform = META_MONITOR_TRANSFORM_90;
+
+ test_setup = create_monitor_test_setup (&test_case,
+ MONITOR_TEST_FLAG_NO_STORED);
+ emulate_hotplug (test_setup);
+ check_monitor_configuration (&test_case);
+}
+
+static void
meta_test_monitor_custom_vertical_config (void)
{
MonitorTestCase test_case = {
@@ -5887,6 +5920,8 @@ init_monitor_tests (void)
meta_test_monitor_underscanning_config);
add_monitor_test ("/backends/monitor/preferred-non-first-mode",
meta_test_monitor_preferred_non_first_mode);
+ add_monitor_test ("/backends/monitor/non-upright-panel",
+ meta_test_monitor_non_upright_panel);
add_monitor_test ("/backends/monitor/custom/vertical-config",
meta_test_monitor_custom_vertical_config);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]