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

Unified Diff: base/directory_watcher_unittest.cc

Issue 12907: Make FilePath accept FilePath as Append parameter. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years 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
« no previous file with comments | « no previous file | base/file_path.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/directory_watcher_unittest.cc
===================================================================
--- base/directory_watcher_unittest.cc (revision 6311)
+++ base/directory_watcher_unittest.cc (working copy)
@@ -6,12 +6,17 @@
#include <fstream>
+#include "build/build_config.h"
+
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/string_util.h"
+#if defined(OS_WIN)
+#include "base/win_util.h"
+#endif
#include "testing/gtest/include/gtest/gtest.h"
// For tests where we wait a bit to verify nothing happened
@@ -125,8 +130,15 @@
// Verify that modifications to a subdirectory isn't noticed.
TEST_F(DirectoryWatcherTest, SubDir) {
- FilePath subdir = test_dir_.Append(FILE_PATH_LITERAL("SubDir"));
- ASSERT_TRUE(file_util::CreateDirectory(subdir.value()));
+#if defined(OS_WIN)
+ // Temporarily disabling test on Vista, see
+ // http://code.google.com/p/chromium/issues/detail?id=5072
+ // TODO: Enable this test, quickly.
+ if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA)
+ return;
+#endif
+ FilePath subdir(FILE_PATH_LITERAL("SubDir"));
+ ASSERT_TRUE(file_util::CreateDirectory(test_dir_.Append(subdir)));
DirectoryWatcher watcher;
ASSERT_TRUE(watcher.Watch(test_dir_, this));
@@ -141,7 +153,7 @@
loop_.Run();
// We shouldn't have been notified and shouldn't have crashed.
- ASSERT_EQ(directory_mods_, 0);
+ ASSERT_EQ(0, directory_mods_);
}
namespace {
« no previous file with comments | « no previous file | base/file_path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698