OLD | NEW |
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 "webkit/fileapi/syncable/local_file_change_tracker.h" | 5 #include "webkit/fileapi/syncable/local_file_change_tracker.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 base::MessageLoopProxy::current()); | 43 base::MessageLoopProxy::current()); |
44 ASSERT_EQ(SYNC_STATUS_OK, | 44 ASSERT_EQ(SYNC_STATUS_OK, |
45 file_system_.MaybeInitializeFileSystemContext(sync_context_)); | 45 file_system_.MaybeInitializeFileSystemContext(sync_context_)); |
46 } | 46 } |
47 | 47 |
48 virtual void TearDown() OVERRIDE { | 48 virtual void TearDown() OVERRIDE { |
49 if (sync_context_) | 49 if (sync_context_) |
50 sync_context_->ShutdownOnUIThread(); | 50 sync_context_->ShutdownOnUIThread(); |
51 sync_context_ = NULL; | 51 sync_context_ = NULL; |
52 | 52 |
53 message_loop_.RunAllPending(); | 53 message_loop_.RunUntilIdle(); |
54 file_system_.TearDown(); | 54 file_system_.TearDown(); |
55 // Make sure we don't leave the external filesystem. | 55 // Make sure we don't leave the external filesystem. |
56 // (CannedSyncableFileSystem::TearDown does not do this as there may be | 56 // (CannedSyncableFileSystem::TearDown does not do this as there may be |
57 // multiple syncable file systems registered for the name) | 57 // multiple syncable file systems registered for the name) |
58 RevokeSyncableFileSystem("test"); | 58 RevokeSyncableFileSystem("test"); |
59 } | 59 } |
60 | 60 |
61 protected: | 61 protected: |
62 FileSystemURL URL(const std::string& path) { | 62 FileSystemURL URL(const std::string& path) { |
63 return file_system_.URL(path); | 63 return file_system_.URL(path); |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 ASSERT_EQ(2U, urls_to_process.size()); | 528 ASSERT_EQ(2U, urls_to_process.size()); |
529 | 529 |
530 // The exact order of recursive removal cannot be determined. | 530 // The exact order of recursive removal cannot be determined. |
531 EXPECT_TRUE(URL(kPath1) == urls_to_process[0] || | 531 EXPECT_TRUE(URL(kPath1) == urls_to_process[0] || |
532 URL(kPath2) == urls_to_process[0]); | 532 URL(kPath2) == urls_to_process[0]); |
533 EXPECT_TRUE(URL(kPath1) == urls_to_process[1] || | 533 EXPECT_TRUE(URL(kPath1) == urls_to_process[1] || |
534 URL(kPath2) == urls_to_process[1]); | 534 URL(kPath2) == urls_to_process[1]); |
535 } | 535 } |
536 | 536 |
537 } // namespace fileapi | 537 } // namespace fileapi |
OLD | NEW |