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

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

Issue 2339253004: Make SyncEngineTest's SequencedWorkerPool multi-threaded. (Closed)
Patch Set: Created 4 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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 14 matching lines...) Expand all
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 namespace sync_file_system { 27 namespace sync_file_system {
28 namespace drive_backend { 28 namespace drive_backend {
29 29
30 class SyncEngineTest : public testing::Test, 30 class SyncEngineTest : public testing::Test,
31 public base::SupportsWeakPtr<SyncEngineTest> { 31 public base::SupportsWeakPtr<SyncEngineTest> {
32 public: 32 public:
33 typedef RemoteFileSyncService::OriginStatusMap RemoteOriginStatusMap; 33 typedef RemoteFileSyncService::OriginStatusMap RemoteOriginStatusMap;
34 34
35 SyncEngineTest() : worker_pool_owner_(1, "Worker") {} 35 SyncEngineTest() : worker_pool_owner_(2, "Worker") {}
36 ~SyncEngineTest() override {} 36 ~SyncEngineTest() override {}
37 37
38 void SetUp() override { 38 void SetUp() override {
39 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir()); 39 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir());
40 40
41 std::unique_ptr<drive::DriveServiceInterface> fake_drive_service( 41 std::unique_ptr<drive::DriveServiceInterface> fake_drive_service(
42 new drive::FakeDriveService); 42 new drive::FakeDriveService);
43 43
44 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = 44 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner =
45 base::ThreadTaskRunnerHandle::Get(); 45 base::ThreadTaskRunnerHandle::Get();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 TEST_F(SyncEngineTest, ProcessRemoteChange) { 227 TEST_F(SyncEngineTest, ProcessRemoteChange) {
228 SyncStatusCode sync_status; 228 SyncStatusCode sync_status;
229 storage::FileSystemURL url; 229 storage::FileSystemURL url;
230 sync_engine()->ProcessRemoteChange(CreateResultReceiver(&sync_status, &url)); 230 sync_engine()->ProcessRemoteChange(CreateResultReceiver(&sync_status, &url));
231 WaitForWorkerTaskRunner(); 231 WaitForWorkerTaskRunner();
232 EXPECT_EQ(SYNC_STATUS_OK, sync_status); 232 EXPECT_EQ(SYNC_STATUS_OK, sync_status);
233 } 233 }
234 234
235 } // namespace drive_backend 235 } // namespace drive_backend
236 } // namespace sync_file_system 236 } // 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