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

Side by Side Diff: chrome/browser/sync_file_system/sync_file_system_service_unittest.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 "chrome/browser/sync_file_system/sync_file_system_service.h" 5 #include "chrome/browser/sync_file_system/sync_file_system_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 class SyncFileSystemServiceTest : public testing::Test { 130 class SyncFileSystemServiceTest : public testing::Test {
131 protected: 131 protected:
132 SyncFileSystemServiceTest() 132 SyncFileSystemServiceTest()
133 : thread_bundle_(content::TestBrowserThreadBundle::REAL_FILE_THREAD | 133 : thread_bundle_(content::TestBrowserThreadBundle::REAL_FILE_THREAD |
134 content::TestBrowserThreadBundle::REAL_IO_THREAD) {} 134 content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
135 135
136 void SetUp() override { 136 void SetUp() override {
137 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); 137 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default()));
138 file_system_.reset(new CannedSyncableFileSystem( 138 file_system_.reset(new CannedSyncableFileSystem(
139 GURL(kOrigin), 139 GURL(kOrigin), in_memory_env_.get(),
140 in_memory_env_.get(), 140 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
141 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), 141 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
142 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
143 142
144 std::unique_ptr<LocalFileSyncService> local_service = 143 std::unique_ptr<LocalFileSyncService> local_service =
145 LocalFileSyncService::CreateForTesting(&profile_, in_memory_env_.get()); 144 LocalFileSyncService::CreateForTesting(&profile_, in_memory_env_.get());
146 remote_service_ = new StrictMock<MockRemoteFileSyncService>; 145 remote_service_ = new StrictMock<MockRemoteFileSyncService>;
147 sync_service_.reset(new SyncFileSystemService(&profile_)); 146 sync_service_.reset(new SyncFileSystemService(&profile_));
148 147
149 EXPECT_CALL(*mock_remote_service(), 148 EXPECT_CALL(*mock_remote_service(),
150 AddServiceObserver(_)).Times(1); 149 AddServiceObserver(_)).Times(1);
151 EXPECT_CALL(*mock_remote_service(), 150 EXPECT_CALL(*mock_remote_service(),
152 AddFileStatusObserver(sync_service_.get())).Times(1); 151 AddFileStatusObserver(sync_service_.get())).Times(1);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 base::Bind(&AssignValueAndQuit<SyncFileStatus>, 482 base::Bind(&AssignValueAndQuit<SyncFileStatus>,
484 &run_loop, &status, &sync_file_status)); 483 &run_loop, &status, &sync_file_status));
485 run_loop.Run(); 484 run_loop.Run();
486 485
487 EXPECT_EQ(SYNC_STATUS_OK, status); 486 EXPECT_EQ(SYNC_STATUS_OK, status);
488 EXPECT_EQ(SYNC_FILE_STATUS_HAS_PENDING_CHANGES, sync_file_status); 487 EXPECT_EQ(SYNC_FILE_STATUS_HAS_PENDING_CHANGES, sync_file_status);
489 } 488 }
490 } 489 }
491 490
492 } // namespace sync_file_system 491 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698