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

Unified Diff: base/directory_watcher_unittest.cc

Issue 18198: Add user script support to extensions. (Closed)
Patch Set: Compile fixes for linux and mac Created 11 years, 11 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
« no previous file with comments | « no previous file | base/directory_watcher_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/directory_watcher_unittest.cc
diff --git a/base/directory_watcher_unittest.cc b/base/directory_watcher_unittest.cc
index 23ae8039b5ca31301f833a5cafe6327037648c8f..7280dff66e0dfd786669c0cbf4b6f38ef508d849 100644
--- a/base/directory_watcher_unittest.cc
+++ b/base/directory_watcher_unittest.cc
@@ -128,15 +128,8 @@ TEST_F(DirectoryWatcherTest, Unregister) {
ASSERT_EQ(directory_mods_, 0);
}
-// Verify that modifications to a subdirectory isn't noticed.
+// Verify that modifications to a subdirectory are noticed.
TEST_F(DirectoryWatcherTest, SubDir) {
-#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)));
@@ -145,15 +138,7 @@ TEST_F(DirectoryWatcherTest, SubDir) {
// Write a file to the subdir.
FilePath test_path = subdir.AppendASCII("test_file");
WriteTestDirFile(test_path.value(), "some content");
-
- // We won't get a notification, so we just wait around a bit to verify
- // that notification doesn't come.
- loop_.PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask,
- kWaitForEventTime);
- loop_.Run();
-
- // We shouldn't have been notified and shouldn't have crashed.
- ASSERT_EQ(0, directory_mods_);
+ LoopUntilModsEqual(2);
}
namespace {
« no previous file with comments | « no previous file | base/directory_watcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698