]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Add a regression test for DesktopNames feature
authorRobert Ancell <robert.ancell@canonical.com>
Mon, 20 Oct 2014 14:04:33 +0000 (10:04 -0400)
committerRobert Ancell <robert.ancell@canonical.com>
Mon, 20 Oct 2014 14:04:33 +0000 (10:04 -0400)
tests/Makefile.am
tests/data/sessions/named-legacy.desktop [new file with mode: 0644]
tests/data/sessions/named.desktop
tests/scripts/xdg-current-desktop-legacy.conf [new file with mode: 0644]
tests/scripts/xdg-current-desktop.conf
tests/test-xdg-current-desktop-legacy [new file with mode: 0755]

index 2f0087d3a3e3bb14c6c1575247fd5ec0859ec009..8bfd1add07bafc6794de98837b6923d504ad4bfd 100644 (file)
@@ -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 (file)
index 0000000..3c0870d
--- /dev/null
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Name=Test Session
+Comment=LightDM test session
+Exec=test-session
+X-LightDM-DesktopName=TestDesktop
index 3c0870d7088940ccf97f1c8350f67190fb5870a6..bab172f56cb877382a1ff7126eac8e30835b8238 100644 (file)
@@ -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 (file)
index 0000000..1e01288
--- /dev/null
@@ -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
index a3845043e880c3b1e74ba68683d855c2e6733fbe..00f6d8a330b49b81ee3f2b0351b0a78175a3acc4 100644 (file)
@@ -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 (executable)
index 0000000..3ce1d5f
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner xdg-current-desktop-legacy test-gobject-greeter