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

Unified Diff: third_party/xdg-utils/tests/xdg-icon-resource/t.icon_system_uninstall

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-icon-resource/t.icon_system_uninstall
===================================================================
--- third_party/xdg-utils/tests/xdg-icon-resource/t.icon_system_uninstall (revision 0)
+++ third_party/xdg-utils/tests/xdg-icon-resource/t.icon_system_uninstall (revision 0)
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+## Include utility functions.
+. "$XDG_TEST_DIR/include/testassertions.sh"
+. "$XDG_TEST_DIR/include/testcontrol.sh"
+
+## Test function
+test_icon_system_uninstall() {
+test_start "$FUNCNAME: verify $ICON is uninstalled correctly with --mode system"
+
+## Begin the test.
+systempath="${XDG_DATA_DIRS-/usr/local/share:/usr/share}:/usr/share/pixmaps"
+
+# Dependencies section
+test_init
+
+require_root
+set_no_display
+
+use_file "$XDG_TEST_DIR/icons/$ICON" ICONFILE
+assert_file "$ICONFILE"
+
+# Verify the test icon is not installed already.
+assert_exit 0 xdg-icon-resource install --mode system --size "$SIZE" "$ICONFILE"
+assert_file_in_path "$ICONFILE" "$systempath"
+
+# Test steps section
+test_procedure
+
+assert_exit 0 xdg-icon-resource uninstall --mode system --size "$SIZE" "$ICONFILE"
+assert_nostdout
+assert_nostderr
+
+assert_file_not_in_path "$ICONFILE" "$systempath"
+
+test_result
+}
+
+repeat_test test_icon_system_uninstall 2 ICON SIZE 'red-16.png' 'red-22.png' 'red-24.png' 'red-32.png' 16 22 24 32
+repeat_test test_icon_system_uninstall 2 ICON SIZE 'red-48.png' 'red-64.png' 'red-128.png' 48 64 128
Property changes on: third_party/xdg-utils/tests/xdg-icon-resource/t.icon_system_uninstall
___________________________________________________________________
Name: svn:executable
+ *

Powered by Google App Engine
This is Rietveld 408576698