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

Unified Diff: base/test/test_file_util.h

Issue 10914109: Refactoring and tests for the highly undertested file_util::CreateOrUpdateShortcutLink() method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better path matching Created 8 years, 3 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: base/test/test_file_util.h
diff --git a/base/test/test_file_util.h b/base/test/test_file_util.h
index 165af7092a1209309fddd50b035b76c00a51ea81..2eb80aaa80a8c20ff0eeadff2bdd2c87d834990f 100644
--- a/base/test/test_file_util.h
+++ b/base/test/test_file_util.h
@@ -11,11 +11,27 @@
#include "base/compiler_specific.h"
#include "base/file_path.h"
+#include "base/file_util.h"
class FilePath;
namespace file_util {
+#if defined(OS_WIN)
+ enum VerifyShortcutStatus {
+ VERIFY_SHORTCUT_SUCCESS = 0,
+ VERIFY_SHORTCUT_FAILURE_UNEXPECTED,
+ VERIFY_SHORTCUT_FAILURE_FILE_NOT_FOUND,
+ VERIFY_SHORTCUT_FAILURE_TARGET,
+ VERIFY_SHORTCUT_FAILURE_WORKING_DIR,
+ VERIFY_SHORTCUT_FAILURE_ARGUMENTS,
+ VERIFY_SHORTCUT_FAILURE_DESCRIPTION,
+ VERIFY_SHORTCUT_FAILURE_ICON,
+ VERIFY_SHORTCUT_FAILURE_APP_ID,
+ VERIFY_SHORTCUT_FAILURE_DUAL_MODE,
+ };
+#endif // defined(OS_WIN)
+
// Wrapper over file_util::Delete. On Windows repeatedly invokes Delete in case
// of failure to workaround Windows file locking semantics. Returns true on
// success.
@@ -35,6 +51,11 @@ bool CopyRecursiveDirNoCache(const FilePath& source_dir,
const FilePath& dest_dir);
#if defined(OS_WIN)
+// Verify that a shortcut exists at |shortcut_path| with the expected
+// |properties|.
+VerifyShortcutStatus VerifyShortcut(const string16& shortcut_path,
+ const ShortcutProperties& properties);
+
// Returns true if the volume supports Alternate Data Streams.
bool VolumeSupportsADS(const FilePath& path);
« base/file_util.h ('K') | « base/file_util_win.cc ('k') | base/test/test_file_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698