summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-10-20 10:04:33 -0400
committerRobert Ancell <robert.ancell@canonical.com>2014-10-20 10:04:33 -0400
commit78dd3bd3f75c759ca4ed06eaa4823483fd9783b3 (patch)
tree8acab251894eb26fc5282d30ab34e5f9b220c3b9
parente23abd7ae66915a69eefe09b710d5ba7f143b61a (diff)
downloadlightdm-78dd3bd3f75c759ca4ed06eaa4823483fd9783b3.tar.gz
Add a regression test for DesktopNames feature
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/data/sessions/named-legacy.desktop5
-rw-r--r--tests/data/sessions/named.desktop2
-rw-r--r--tests/scripts/xdg-current-desktop-legacy.conf30
-rw-r--r--tests/scripts/xdg-current-desktop.conf2
-rwxr-xr-xtests/test-xdg-current-desktop-legacy2
6 files changed, 42 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2f0087d3..8bfd1add 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -56,6 +56,7 @@ TESTS = \
test-login-guest-session-config \
test-group-membership \
test-xdg-current-desktop \
+ test-xdg-current-desktop-legacy \
test-language-env \
test-session-stdout \
test-session-stderr \
@@ -347,6 +348,7 @@ EXTRA_DIST = \
data/sessions/mir.desktop \
data/sessions/mir-container.desktop \
data/sessions/named.desktop \
+ data/sessions/named-legacy.desktop \
scripts/0-additional.conf \
scripts/1-additional.conf \
scripts/additional-config.conf \
@@ -557,6 +559,7 @@ EXTRA_DIST = \
scripts/vnc-open-file-descriptors.conf \
scripts/xauthority.conf \
scripts/xdg-current-desktop.conf \
+ scripts/xdg-current-desktop-legacy.conf \
scripts/xdmcp-client.conf \
scripts/xdmcp-server-autologin.conf \
scripts/xdmcp-server-double-login.conf \
diff --git a/tests/data/sessions/named-legacy.desktop b/tests/data/sessions/named-legacy.desktop
new file mode 100644
index 00000000..3c0870d7
--- /dev/null
+++ b/tests/data/sessions/named-legacy.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Name=Test Session
+Comment=LightDM test session
+Exec=test-session
+X-LightDM-DesktopName=TestDesktop
diff --git a/tests/data/sessions/named.desktop b/tests/data/sessions/named.desktop
index 3c0870d7..bab172f5 100644
--- a/tests/data/sessions/named.desktop
+++ b/tests/data/sessions/named.desktop
@@ -2,4 +2,4 @@
Name=Test Session
Comment=LightDM test session
Exec=test-session
-X-LightDM-DesktopName=TestDesktop
+DesktopNames=TestDesktop1;TestDesktop2;
diff --git a/tests/scripts/xdg-current-desktop-legacy.conf b/tests/scripts/xdg-current-desktop-legacy.conf
new file mode 100644
index 00000000..1e012884
--- /dev/null
+++ b/tests/scripts/xdg-current-desktop-legacy.conf
@@ -0,0 +1,30 @@
+#
+# Check XDG_CURRENT_DESKTOP is set for sessions that support it using the legacy key name
+#
+
+[SeatDefaults]
+autologin-user=have-password1
+user-session=named-legacy
+
+#?*START-DAEMON
+#?RUNNER DAEMON-START
+
+# X server starts
+#?XSERVER-0 START VT=7 SEAT=seat0
+
+# Daemon connects when X server is ready
+#?*XSERVER-0 INDICATE-READY
+#?XSERVER-0 INDICATE-READY
+#?XSERVER-0 ACCEPT-CONNECT
+
+# Session starts
+#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_CURRENT_DESKTOP=TestDesktop XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=named-legacy USER=have-password1
+#?LOGIN1 ACTIVATE-SESSION SESSION=c0
+#?XSERVER-0 ACCEPT-CONNECT
+#?SESSION-X-0 CONNECT-XSERVER
+
+# Cleanup
+#?*STOP-DAEMON
+#?SESSION-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/xdg-current-desktop.conf b/tests/scripts/xdg-current-desktop.conf
index a3845043..00f6d8a3 100644
--- a/tests/scripts/xdg-current-desktop.conf
+++ b/tests/scripts/xdg-current-desktop.conf
@@ -18,7 +18,7 @@ user-session=named
#?XSERVER-0 ACCEPT-CONNECT
# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_CURRENT_DESKTOP=TestDesktop XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=named USER=have-password1
+#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_CURRENT_DESKTOP=TestDesktop1:TestDesktop2 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=named USER=have-password1
#?LOGIN1 ACTIVATE-SESSION SESSION=c0
#?XSERVER-0 ACCEPT-CONNECT
#?SESSION-X-0 CONNECT-XSERVER
diff --git a/tests/test-xdg-current-desktop-legacy b/tests/test-xdg-current-desktop-legacy
new file mode 100755
index 00000000..3ce1d5fe
--- /dev/null
+++ b/tests/test-xdg-current-desktop-legacy
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner xdg-current-desktop-legacy test-gobject-greeter