| OLD | NEW | 
|    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #include "base/files/file_path_watcher.h" |    5 #include "base/files/file_path_watcher.h" | 
|    6  |    6  | 
|    7 #include <set> |    7 #include <set> | 
|    8  |    8  | 
|    9 #if defined(OS_WIN) |    9 #if defined(OS_WIN) | 
|   10 #include <windows.h> |   10 #include <windows.h> | 
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  365   VLOG(1) << "Create File"; |  365   VLOG(1) << "Create File"; | 
|  366   ASSERT_TRUE(WriteFile(file, "content")); |  366   ASSERT_TRUE(WriteFile(file, "content")); | 
|  367   VLOG(1) << "Waiting for file creation"; |  367   VLOG(1) << "Waiting for file creation"; | 
|  368   ASSERT_TRUE(WaitForEvents()); |  368   ASSERT_TRUE(WaitForEvents()); | 
|  369  |  369  | 
|  370   ASSERT_TRUE(WriteFile(file, "content v2")); |  370   ASSERT_TRUE(WriteFile(file, "content v2")); | 
|  371   VLOG(1) << "Waiting for file modification"; |  371   VLOG(1) << "Waiting for file modification"; | 
|  372   ASSERT_TRUE(WaitForEvents()); |  372   ASSERT_TRUE(WaitForEvents()); | 
|  373 } |  373 } | 
|  374  |  374  | 
 |  375 #if defined(OS_MACOSX) | 
 |  376 // http://crbug.com/85930 | 
 |  377 #define DisappearingDirectory FLAKY_DisappearingDirectory | 
 |  378 #endif | 
|  375 TEST_F(FilePathWatcherTest, DisappearingDirectory) { |  379 TEST_F(FilePathWatcherTest, DisappearingDirectory) { | 
|  376   FilePathWatcher watcher; |  380   FilePathWatcher watcher; | 
|  377   FilePath dir(temp_dir_.path().AppendASCII("dir")); |  381   FilePath dir(temp_dir_.path().AppendASCII("dir")); | 
|  378   FilePath file(dir.AppendASCII("file")); |  382   FilePath file(dir.AppendASCII("file")); | 
|  379   ASSERT_TRUE(file_util::CreateDirectory(dir)); |  383   ASSERT_TRUE(file_util::CreateDirectory(dir)); | 
|  380   ASSERT_TRUE(WriteFile(file, "content")); |  384   ASSERT_TRUE(WriteFile(file, "content")); | 
|  381   scoped_refptr<TestDelegate> delegate(new TestDelegate(collector())); |  385   scoped_refptr<TestDelegate> delegate(new TestDelegate(collector())); | 
|  382   ASSERT_TRUE(SetupWatch(file, &watcher, delegate.get())); |  386   ASSERT_TRUE(SetupWatch(file, &watcher, delegate.get())); | 
|  383  |  387  | 
|  384   ASSERT_TRUE(file_util::Delete(dir, true)); |  388   ASSERT_TRUE(file_util::Delete(dir, true)); | 
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  784   ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, false)); |  788   ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, false)); | 
|  785   ASSERT_TRUE(WaitForEvents()); |  789   ASSERT_TRUE(WaitForEvents()); | 
|  786   ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, true)); |  790   ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, true)); | 
|  787 } |  791 } | 
|  788  |  792  | 
|  789 #endif  // OS_MACOSX |  793 #endif  // OS_MACOSX | 
|  790 }  // namespace |  794 }  // namespace | 
|  791  |  795  | 
|  792 }  // namespace files |  796 }  // namespace files | 
|  793 }  // namespace base |  797 }  // namespace base | 
| OLD | NEW |