[mutter] tests: Add rotated multi head monitor config migration test
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests: Add rotated multi head monitor config migration test
- Date: Mon, 21 Aug 2017 04:47:15 +0000 (UTC)
commit 6c0f107db06cb6e6c7586d9a87bd02a8f67ebb3f
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Aug 11 10:40:04 2017 +0800
tests: Add rotated multi head monitor config migration test
https://bugzilla.gnome.org/show_bug.cgi?id=777732
src/tests/migration/first-rotated-new.xml | 44 +++++++++++++++++++++++
src/tests/migration/first-rotated-old.xml | 37 +++++++++++++++++++
src/tests/monitor-config-migration-unit-tests.c | 8 ++++
3 files changed, 89 insertions(+), 0 deletions(-)
---
diff --git a/src/tests/migration/first-rotated-new.xml b/src/tests/migration/first-rotated-new.xml
new file mode 100644
index 0000000..9f875c2
--- /dev/null
+++ b/src/tests/migration/first-rotated-new.xml
@@ -0,0 +1,44 @@
+<monitors version="2">
+ <configuration>
+ <migrated/>
+ <logicalmonitor>
+ <x>0</x>
+ <y>0</y>
+ <transform>
+ <rotation>left</rotation>
+ <flipped>no</flipped>
+ </transform>
+ <monitor>
+ <monitorspec>
+ <connector>HDMI-1</connector>
+ <vendor>DEL</vendor>
+ <product>DELL P2415Q</product>
+ <serial>GTTPW67P0WFB</serial>
+ </monitorspec>
+ <mode>
+ <width>3840</width>
+ <height>2160</height>
+ <rate>29.981103897094727</rate>
+ </mode>
+ </monitor>
+ </logicalmonitor>
+ <logicalmonitor>
+ <x>2160</x>
+ <y>0</y>
+ <primary>yes</primary>
+ <monitor>
+ <monitorspec>
+ <connector>eDP-1</connector>
+ <vendor>AUO</vendor>
+ <product>0x123d</product>
+ <serial>0x00000000</serial>
+ </monitorspec>
+ <mode>
+ <width>1920</width>
+ <height>1080</height>
+ <rate>60.049972534179688</rate>
+ </mode>
+ </monitor>
+ </logicalmonitor>
+ </configuration>
+</monitors>
diff --git a/src/tests/migration/first-rotated-old.xml b/src/tests/migration/first-rotated-old.xml
new file mode 100644
index 0000000..b00a359
--- /dev/null
+++ b/src/tests/migration/first-rotated-old.xml
@@ -0,0 +1,37 @@
+<monitors version="1">
+ <configuration>
+ <clone>no</clone>
+ <output name="HDMI-1">
+ <vendor>DEL</vendor>
+ <product>DELL P2415Q</product>
+ <serial>GTTPW67P0WFB</serial>
+ <width>2160</width>
+ <height>3840</height>
+ <rate>29.981103897094727</rate>
+ <x>0</x>
+ <y>0</y>
+ <rotation>left</rotation>
+ <reflect_x>no</reflect_x>
+ <reflect_y>no</reflect_y>
+ <primary>no</primary>
+ <presentation>no</presentation>
+ <underscanning>no</underscanning>
+ </output>
+ <output name="eDP-1">
+ <vendor>AUO</vendor>
+ <product>0x123d</product>
+ <serial>0x00000000</serial>
+ <width>1920</width>
+ <height>1080</height>
+ <rate>60.049972534179688</rate>
+ <x>2160</x>
+ <y>0</y>
+ <rotation>normal</rotation>
+ <reflect_x>no</reflect_x>
+ <reflect_y>no</reflect_y>
+ <primary>yes</primary>
+ <presentation>no</presentation>
+ <underscanning>no</underscanning>
+ </output>
+ </configuration>
+</monitors>
diff --git a/src/tests/monitor-config-migration-unit-tests.c b/src/tests/monitor-config-migration-unit-tests.c
index 08d788c..15c27b3 100644
--- a/src/tests/monitor-config-migration-unit-tests.c
+++ b/src/tests/monitor-config-migration-unit-tests.c
@@ -100,6 +100,12 @@ meta_test_monitor_config_migration_tiled (void)
test_migration ("tiled-old.xml", "tiled-new.xml");
}
+static void
+meta_test_monitor_config_migration_first_rotated (void)
+{
+ test_migration ("first-rotated-old.xml", "first-rotated-new.xml");
+}
+
void
init_monitor_config_migration_tests (void)
{
@@ -109,4 +115,6 @@ init_monitor_config_migration_tests (void)
meta_test_monitor_config_migration_rotated);
g_test_add_func ("/backends/monitor-config-migration/tiled",
meta_test_monitor_config_migration_tiled);
+ g_test_add_func ("/backends/monitor-config-migration/first-rotated",
+ meta_test_monitor_config_migration_first_rotated);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]