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

Side by Side Diff: third_party/xdg-utils/tests/xdg-desktop-icon/t.05-desktop_icon_uninstall

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_uninstall() {
9 ## Begin the test.
10 DIR="$XDG_TEST_DIR/xdg-desktop-icon/data"
11 FILE="desktop_icon_install.desktop"
12 test_start "$FUNCNAME: verify desktop file is uninstalled correctly from the des ktop"
13 DESKTOP="$HOME/Desktop"
14
15 # Dependencies section
16 test_init
17
18 use_file "$XDG_TEST_DIR/xdg-desktop-icon/data/desktop_icon_install.desktop" DESK _FILE
19 edit_file "$XDG_TEST_TMPDIR/$DESK_FILE" 'xdg-test-desktop-icon-install.tmp' CREA TE_FILE
20 edit_file "$DESK_FILE" 'Desktop_Icon' ICON_TEXT "Uninstall $XDG_TEST_SHORTID"
21 assert_file "$XDG_TEST_TMPDIR/$DESK_FILE"
22
23 set_no_display
24
25 # Verify the test icon is not installed already.
26 assert_exit 0 xdg-desktop-icon install "$XDG_TEST_TMPDIR/$DESK_FILE"
27
28 assert_file_in_path "$DESK_FILE" "$DESKTOP"
29 assert_interactive_notroot "Is an icon named '$ICON_TEXT' present on the desktop ?" y
30
31 # Test steps section
32 test_procedure
33
34 assert_exit 0 xdg-desktop-icon uninstall "$DESK_FILE"
35 assert_nostdout
36 assert_nostderr
37
38 assert_file_not_in_path "$DESK_FILE" "$DESKTOP"
39 assert_interactive_notroot "Is an icon named '$ICON_TEXT' still present on the d esktop?" n
40
41 test_result
42 }
43
44 run_test test_desktop_icon_uninstall
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698