Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: third_party/xdg-utils/tests/xdg-screensaver/t.01-screensave_status

Issue 151098: Patch from mdm@google.com... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/xdg-utils/tests/xdg-screensaver/t.01-screensave_status
===================================================================
--- third_party/xdg-utils/tests/xdg-screensaver/t.01-screensave_status (revision 0)
+++ third_party/xdg-utils/tests/xdg-screensaver/t.01-screensave_status (revision 0)
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+## Include utility functions.
+. "$XDG_TEST_DIR/include/testassertions.sh"
+. "$XDG_TEST_DIR/include/testcontrol.sh"
+
+## Test function
+test_screensave_status() {
+test_start "$FUNCNAME: verify screensaver status returns 'enabled' or 'disabled'"
+test_purpose "The screensaver may have status 'enabled' or 'disabled'. (Not both as bug 7592.)"
+
+test_init
+
+require_notroot
+## Require a running X server
+assert_display
+
+test_procedure
+
+# TODO: check for exactly one of disabled or enabled on output
+assert_exit 0 xdg-screensaver status
+assert_stdout
+assert_nostderr
+
+## See bug 7592
+screenstat=`cat out.stdout`
+assert_exit 0 test "$screenstat" = 'enabled' -o "$screenstat" = 'disabled'
+
+test_result
+}
+
+run_test test_screensave_status
Property changes on: third_party/xdg-utils/tests/xdg-screensaver/t.01-screensave_status
___________________________________________________________________
Name: svn:executable
+ *

Powered by Google App Engine
This is Rietveld 408576698