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

Side by Side Diff: base/files/file_path_watcher_browsertest.cc

Issue 10019016: Update uses of TimeDelta in base/files. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 750
751 FilePathWatcher watcher; 751 FilePathWatcher watcher;
752 scoped_refptr<TestDelegate> delegate(new TestDelegate(collector())); 752 scoped_refptr<TestDelegate> delegate(new TestDelegate(collector()));
753 ASSERT_TRUE(SetupWatch(test_file, &watcher, delegate.get())); 753 ASSERT_TRUE(SetupWatch(test_file, &watcher, delegate.get()));
754 754
755 // We should not get notified in this case as it hasn't affected our ability 755 // We should not get notified in this case as it hasn't affected our ability
756 // to access the file. 756 // to access the file.
757 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Read, false)); 757 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Read, false));
758 loop_.PostDelayedTask(FROM_HERE, 758 loop_.PostDelayedTask(FROM_HERE,
759 MessageLoop::QuitClosure(), 759 MessageLoop::QuitClosure(),
760 TestTimeouts::tiny_timeout_ms()); 760 TestTimeouts::tiny_timeout());
761 ASSERT_FALSE(WaitForEvents()); 761 ASSERT_FALSE(WaitForEvents());
762 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Read, true)); 762 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Read, true));
763 763
764 // We should get notified in this case because filepathwatcher can no 764 // We should get notified in this case because filepathwatcher can no
765 // longer access the file 765 // longer access the file
766 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, false)); 766 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, false));
767 ASSERT_TRUE(WaitForEvents()); 767 ASSERT_TRUE(WaitForEvents());
768 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, true)); 768 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, true));
769 } 769 }
770 770
771 #endif // OS_MACOSX 771 #endif // OS_MACOSX
772 } // namespace 772 } // namespace
773 773
774 } // namespace files 774 } // namespace files
775 } // namespace base 775 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698