OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
6 #include <stack> | 6 #include <stack> |
7 | 7 |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 virtual void TearDown() OVERRIDE { | 124 virtual void TearDown() OVERRIDE { |
125 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; | 125 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; |
126 for (iterator itr = file_systems_.begin(); | 126 for (iterator itr = file_systems_.begin(); |
127 itr != file_systems_.end(); ++itr) { | 127 itr != file_systems_.end(); ++itr) { |
128 itr->second->TearDown(); | 128 itr->second->TearDown(); |
129 delete itr->second; | 129 delete itr->second; |
130 } | 130 } |
131 file_systems_.clear(); | 131 file_systems_.clear(); |
132 | 132 |
| 133 local_sync_service_->Shutdown(); |
| 134 |
133 fake_drive_service_helper_.reset(); | 135 fake_drive_service_helper_.reset(); |
| 136 local_sync_service_.reset(); |
134 remote_sync_service_.reset(); | 137 remote_sync_service_.reset(); |
135 | 138 |
136 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 139 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
137 base::RunLoop().RunUntilIdle(); | 140 base::RunLoop().RunUntilIdle(); |
138 RevokeSyncableFileSystem(); | 141 RevokeSyncableFileSystem(); |
139 } | 142 } |
140 | 143 |
141 virtual void OnRemoteChangeQueueUpdated(int64 pending_changes_hint) OVERRIDE { | 144 virtual void OnRemoteChangeQueueUpdated(int64 pending_changes_hint) OVERRIDE { |
142 pending_remote_changes_ = pending_changes_hint; | 145 pending_remote_changes_ = pending_changes_hint; |
143 } | 146 } |
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1673 | 1676 |
1674 EXPECT_EQ(1u, CountApp()); | 1677 EXPECT_EQ(1u, CountApp()); |
1675 EXPECT_EQ(1u, CountLocalFile(app_id)); | 1678 EXPECT_EQ(1u, CountLocalFile(app_id)); |
1676 | 1679 |
1677 EXPECT_EQ(2u, CountMetadata()); | 1680 EXPECT_EQ(2u, CountMetadata()); |
1678 EXPECT_EQ(2u, CountTracker()); | 1681 EXPECT_EQ(2u, CountTracker()); |
1679 } | 1682 } |
1680 | 1683 |
1681 } // namespace drive_backend | 1684 } // namespace drive_backend |
1682 } // namespace sync_file_system | 1685 } // namespace sync_file_system |
OLD | NEW |