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

Side by Side Diff: chrome/browser/chromeos/drive/sync_client_unittest.cc

Issue 23670006: Use DriveService for proper resource id resolution in ChangeListLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/operation_test_base.cc ('k') | 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 (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/chromeos/drive/sync_client.h" 5 #include "chrome/browser/chromeos/drive/sync_client.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 cache_->Store(resource_ids_["dirty"], md5_dirty, 179 cache_->Store(resource_ids_["dirty"], md5_dirty,
180 temp_file, FileCache::FILE_OPERATION_COPY)); 180 temp_file, FileCache::FILE_OPERATION_COPY));
181 EXPECT_EQ(FILE_ERROR_OK, cache_->Pin(resource_ids_["dirty"])); 181 EXPECT_EQ(FILE_ERROR_OK, cache_->Pin(resource_ids_["dirty"]));
182 EXPECT_EQ(FILE_ERROR_OK, cache_->MarkDirty(resource_ids_["dirty"])); 182 EXPECT_EQ(FILE_ERROR_OK, cache_->MarkDirty(resource_ids_["dirty"]));
183 183
184 // Load data from the service to the metadata. 184 // Load data from the service to the metadata.
185 FileError error = FILE_ERROR_FAILED; 185 FileError error = FILE_ERROR_FAILED;
186 internal::ChangeListLoader change_list_loader( 186 internal::ChangeListLoader change_list_loader(
187 base::MessageLoopProxy::current().get(), 187 base::MessageLoopProxy::current().get(),
188 metadata_.get(), 188 metadata_.get(),
189 scheduler_.get()); 189 scheduler_.get(),
190 drive_service_.get());
190 change_list_loader.LoadIfNeeded( 191 change_list_loader.LoadIfNeeded(
191 DirectoryFetchInfo(), 192 DirectoryFetchInfo(),
192 google_apis::test_util::CreateCopyResultCallback(&error)); 193 google_apis::test_util::CreateCopyResultCallback(&error));
193 base::RunLoop().RunUntilIdle(); 194 base::RunLoop().RunUntilIdle();
194 EXPECT_EQ(FILE_ERROR_OK, error); 195 EXPECT_EQ(FILE_ERROR_OK, error);
195 } 196 }
196 197
197 protected: 198 protected:
198 content::TestBrowserThreadBundle thread_bundle_; 199 content::TestBrowserThreadBundle thread_bundle_;
199 base::ScopedTempDir temp_dir_; 200 base::ScopedTempDir temp_dir_;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 331
331 // Fetched and uploaded. 332 // Fetched and uploaded.
332 EXPECT_TRUE(cache_->GetCacheEntry(resource_ids_["foo"], &cache_entry)); 333 EXPECT_TRUE(cache_->GetCacheEntry(resource_ids_["foo"], &cache_entry));
333 EXPECT_TRUE(cache_entry.is_present()); 334 EXPECT_TRUE(cache_entry.is_present());
334 EXPECT_TRUE(cache_->GetCacheEntry(resource_ids_["dirty"], &cache_entry)); 335 EXPECT_TRUE(cache_->GetCacheEntry(resource_ids_["dirty"], &cache_entry));
335 EXPECT_FALSE(cache_entry.is_dirty()); 336 EXPECT_FALSE(cache_entry.is_dirty());
336 } 337 }
337 338
338 } // namespace internal 339 } // namespace internal
339 } // namespace drive 340 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/operation_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698