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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc

Issue 595273003: [SyncFS] Clean up SequencedWorkerPool in SyncEngineTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/sync_file_system/drive_backend/sync_engine.h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 sync_engine_->SetSyncEnabled(true); 66 sync_engine_->SetSyncEnabled(true);
67 sync_engine_->OnReadyToSendRequests(); 67 sync_engine_->OnReadyToSendRequests();
68 68
69 WaitForWorkerTaskRunner(); 69 WaitForWorkerTaskRunner();
70 } 70 }
71 71
72 virtual void TearDown() OVERRIDE { 72 virtual void TearDown() OVERRIDE {
73 sync_engine_.reset(); 73 sync_engine_.reset();
74 WaitForWorkerTaskRunner(); 74 WaitForWorkerTaskRunner();
75 worker_pool_->Shutdown(); 75 worker_pool_->Shutdown();
76
77 worker_task_runner_ = NULL;
78 worker_pool_ = NULL;
79
76 base::RunLoop().RunUntilIdle(); 80 base::RunLoop().RunUntilIdle();
77 } 81 }
78 82
79 bool FindOriginStatus(const GURL& origin, std::string* status) { 83 bool FindOriginStatus(const GURL& origin, std::string* status) {
80 scoped_ptr<RemoteOriginStatusMap> status_map; 84 scoped_ptr<RemoteOriginStatusMap> status_map;
81 sync_engine()->GetOriginStatusMap(CreateResultReceiver(&status_map)); 85 sync_engine()->GetOriginStatusMap(CreateResultReceiver(&status_map));
82 WaitForWorkerTaskRunner(); 86 WaitForWorkerTaskRunner();
83 87
84 RemoteOriginStatusMap::const_iterator itr = status_map->find(origin); 88 RemoteOriginStatusMap::const_iterator itr = status_map->find(origin);
85 if (itr == status_map->end()) 89 if (itr == status_map->end())
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 TEST_F(SyncEngineTest, ProcessRemoteChange) { 229 TEST_F(SyncEngineTest, ProcessRemoteChange) {
226 SyncStatusCode sync_status; 230 SyncStatusCode sync_status;
227 storage::FileSystemURL url; 231 storage::FileSystemURL url;
228 sync_engine()->ProcessRemoteChange(CreateResultReceiver(&sync_status, &url)); 232 sync_engine()->ProcessRemoteChange(CreateResultReceiver(&sync_status, &url));
229 WaitForWorkerTaskRunner(); 233 WaitForWorkerTaskRunner();
230 EXPECT_EQ(SYNC_STATUS_OK, sync_status); 234 EXPECT_EQ(SYNC_STATUS_OK, sync_status);
231 } 235 }
232 236
233 } // namespace drive_backend 237 } // namespace drive_backend
234 } // namespace sync_file_system 238 } // namespace sync_file_system
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