diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-25 05:08:54 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-25 05:08:54 +0000 |
commit | bdbc87ca87fda52c3262240705d974030e9ed4b4 (patch) | |
tree | 6ca34f4c2ba9fe4b340075206846c115a5400d27 /base/directory_watcher_unittest.cc | |
parent | 1692ea885338dd799ae9f47151d2a7fd4d1b10c4 (diff) | |
download | chromium_src-bdbc87ca87fda52c3262240705d974030e9ed4b4.zip chromium_src-bdbc87ca87fda52c3262240705d974030e9ed4b4.tar.gz chromium_src-bdbc87ca87fda52c3262240705d974030e9ed4b4.tar.bz2 |
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
Diffstat (limited to 'base/directory_watcher_unittest.cc')
-rw-r--r-- | base/directory_watcher_unittest.cc | 19 |
1 files changed, 2 insertions, 17 deletions
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 { |