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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/update_operation_unittest.cc

Issue 15974004: drive: Rewrite UpdateOpreation to access cache/metadata on the blocking pool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ClearDirtyOnUIThread Created 7 years, 6 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/update_operation.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 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/chromeos/drive/file_system/update_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/update_operation.h"
6 6
7 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" 7 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h"
8 #include "chrome/browser/google_apis/fake_drive_service.h" 8 #include "chrome/browser/google_apis/fake_drive_service.h"
9 #include "chrome/browser/google_apis/gdata_wapi_parser.h" 9 #include "chrome/browser/google_apis/gdata_wapi_parser.h"
10 #include "chrome/browser/google_apis/test_util.h" 10 #include "chrome/browser/google_apis/test_util.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace drive { 13 namespace drive {
14 namespace file_system { 14 namespace file_system {
15 15
16 class UpdateOperationTest : public OperationTestBase { 16 class UpdateOperationTest : public OperationTestBase {
17 protected: 17 protected:
18 virtual void SetUp() OVERRIDE { 18 virtual void SetUp() OVERRIDE {
19 OperationTestBase::SetUp(); 19 OperationTestBase::SetUp();
20 operation_.reset( 20 operation_.reset(new UpdateOperation(blocking_task_runner(),
21 new UpdateOperation(observer(), scheduler(), metadata(), cache())); 21 observer(),
22 scheduler(),
23 metadata(),
24 cache()));
22 } 25 }
23 26
24 virtual void TearDown() OVERRIDE { 27 virtual void TearDown() OVERRIDE {
25 operation_.reset(); 28 operation_.reset();
26 OperationTestBase::TearDown(); 29 OperationTestBase::TearDown();
27 } 30 }
28 31
29 scoped_ptr<UpdateOperation> operation_; 32 scoped_ptr<UpdateOperation> operation_;
30 }; 33 };
31 34
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 operation_->UpdateFileByResourceId( 107 operation_->UpdateFileByResourceId(
105 "file:nonexistent_resource_id", 108 "file:nonexistent_resource_id",
106 DriveClientContext(USER_INITIATED), 109 DriveClientContext(USER_INITIATED),
107 google_apis::test_util::CreateCopyResultCallback(&error)); 110 google_apis::test_util::CreateCopyResultCallback(&error));
108 google_apis::test_util::RunBlockingPoolTask(); 111 google_apis::test_util::RunBlockingPoolTask();
109 EXPECT_EQ(FILE_ERROR_NOT_FOUND, error); 112 EXPECT_EQ(FILE_ERROR_NOT_FOUND, error);
110 } 113 }
111 114
112 } // namespace file_system 115 } // namespace file_system
113 } // namespace drive 116 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/update_operation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698