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

Side by Side Diff: third_party/xdg-utils/tests/xdg-desktop-icon/t.04-desktop_icon_install

Issue 151098: Patch from mdm@google.com... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Name: svn:executable
+ *
OLDNEW
(Empty)
1 #!/bin/bash
2
3 ## Include utility functions.
4 . "$XDG_TEST_DIR/include/testassertions.sh"
5 . "$XDG_TEST_DIR/include/testcontrol.sh"
6
7 ## Test function
8 test_desktop_icon_install() {
9 ## Begin the test.
10 test_start "$FUNCNAME: verify a desktop file installed correctly on the desktop"
11
12 # Dependencies section
13 test_init
14
15 # Generate .desktop file
16 use_file "$XDG_TEST_DIR/xdg-desktop-icon/data/desktop_icon_install.desktop" DESK _FILE
17 edit_file "$DESK_FILE" 'xdg-test-desktop-icon-install.tmp' CREATE_FILE
18 edit_file "$DESK_FILE" 'Desktop_Icon' ICON_TEXT "Install $XDG_TEST_SHORTID"
19 assert_file "$DESK_FILE"
20 DESKTOP="$HOME/Desktop"
21
22 set_no_display
23
24 # Verify the test icon is not installed already.
25 assert_file_not_in_path "$DESK_FILE" "$DESKTOP"
26 assert_nofile "$HOME/$CREATE_FILE"
27
28 # Test steps section
29 test_procedure
30
31 assert_exit 0 xdg-desktop-icon install "$DESK_FILE"
32 assert_nostdout
33 assert_nostderr
34
35 assert_file_in_path "$DESK_FILE" "$DESKTOP"
36
37 if [ -z "$XDG_TEST_NO_INTERACTIVE" ] && [ `whoami` != root ] ; then
38 assert_interactive "Is there an icon on the desktop with name '$ICON_TEXT'?" y
39 assert_interactive "Please double click the '$ICON_TEXT' icon."
40
41 ## Double clicking will result in the command 'touch xdg-test-desktop-icon-insta ll.tmp' to be run
42 assert_file "$HOME/$CREATE_FILE"
43
44
45 ## Cleanup
46 rm -f "$HOME/$CREATE_FILE"
47 fi
48 xdg-desktop-icon uninstall "$DESK_FILE" >/dev/null 2>&1
49
50 test_result
51 }
52
53 run_test test_desktop_icon_install
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698