From bdbc87ca87fda52c3262240705d974030e9ed4b4 Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Sun, 25 Jan 2009 05:08:54 +0000 Subject: Add user script support to extensions. This is implemented mostly by relying on the existing user script code. But since extension user scripts are declared, not discovered in a directory, I had to add support for adding 'lone' user scripts to UserScriptMaster. This led to a bit of refactoring. Note that this CL relies on: http://codereview.chromium.org/18352 Review URL: http://codereview.chromium.org/18198 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8614 0039d316-1c4b-4281-b951-d872f2087c98 --- base/directory_watcher_unittest.cc | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'base/directory_watcher_unittest.cc') diff --git a/base/directory_watcher_unittest.cc b/base/directory_watcher_unittest.cc index 23ae803..7280dff 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 { -- cgit v1.1