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

Side by Side Diff: third_party/xdg-utils/tests/xdg-icon-resource/t.icon_duplicate_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
6 . "$XDG_TEST_DIR/include/testcontrol.sh"
7
8 ## Test function
9 test_icon_duplicate_install() {
10 test_start "$FUNCNAME: verify $ICON is installed correctly after already being i nstalled"
11
12 ## Begin the test.
13 userpath="$HOME/.icons:$HOME/.local:$XDG_DATA_HOME"
14
15 # Dependencies section
16 test_init
17
18 set_no_display
19 use_file "$XDG_TEST_DIR/icons/$ICON" ICON_FILE
20 assert_file "$ICON_FILE"
21
22 # Verify the test icon is not installed already.
23 assert_exit 0 xdg-icon-resource install --mode user --size "$SIZE" "$ICON_FILE"
24 assert_file_in_path "$ICON_FILE" "$userpath"
25
26 # Test steps section
27 test_procedure
28
29 assert_exit 0 xdg-icon-resource install --mode user --size "$SIZE" "$ICON_FILE"
30 assert_nostdout
31 assert_nostderr
32
33 assert_file_in_path "$ICON_FILE" "$userpath"
34
35 # Cleanup
36 xdg-icon-resource uninstall --mode user --size "$SIZE" "$ICON_FILE"
37
38 test_result
39 }
40
41 repeat_test test_icon_duplicate_install 2 ICON SIZE 'red-16.png' 'red-22.png' 'r ed-24.png' 'red-32.png' 16 22 24 32
42 repeat_test test_icon_duplicate_install 2 ICON SIZE 'red-48.png' 'red-64.png' 'r ed-128.png' 48 64 128
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698