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

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

Issue 18419004: Remove destruction-only TearDown() methods in Drive related test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix Created 7 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 | Annotate | Revision Log
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/move_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/move_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/test_util.h" 8 #include "chrome/browser/google_apis/test_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace drive { 11 namespace drive {
12 namespace file_system { 12 namespace file_system {
13 13
14 class MoveOperationTest : public OperationTestBase { 14 class MoveOperationTest : public OperationTestBase {
15 protected: 15 protected:
16 virtual void SetUp() OVERRIDE { 16 virtual void SetUp() OVERRIDE {
17 OperationTestBase::SetUp(); 17 OperationTestBase::SetUp();
18 operation_.reset(new MoveOperation(observer(), scheduler(), metadata())); 18 operation_.reset(new MoveOperation(observer(), scheduler(), metadata()));
19 } 19 }
20 20
21 virtual void TearDown() OVERRIDE {
22 operation_.reset();
23 OperationTestBase::TearDown();
24 }
25
26 scoped_ptr<MoveOperation> operation_; 21 scoped_ptr<MoveOperation> operation_;
27 }; 22 };
28 23
29 TEST_F(MoveOperationTest, MoveFileInSameDirectory) { 24 TEST_F(MoveOperationTest, MoveFileInSameDirectory) {
30 const base::FilePath src_path( 25 const base::FilePath src_path(
31 FILE_PATH_LITERAL("drive/root/Directory 1/SubDirectory File 1.txt")); 26 FILE_PATH_LITERAL("drive/root/Directory 1/SubDirectory File 1.txt"));
32 const base::FilePath dest_path( 27 const base::FilePath dest_path(
33 FILE_PATH_LITERAL("drive/root/Directory 1/Test.log")); 28 FILE_PATH_LITERAL("drive/root/Directory 1/Test.log"));
34 29
35 ResourceEntry src_entry, dest_entry; 30 ResourceEntry src_entry, dest_entry;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 google_apis::test_util::RunBlockingPoolTask(); 199 google_apis::test_util::RunBlockingPoolTask();
205 EXPECT_EQ(FILE_ERROR_NOT_A_DIRECTORY, error); 200 EXPECT_EQ(FILE_ERROR_NOT_A_DIRECTORY, error);
206 201
207 ResourceEntry entry; 202 ResourceEntry entry;
208 EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(src_path, &entry)); 203 EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(src_path, &entry));
209 EXPECT_EQ(FILE_ERROR_NOT_FOUND, GetLocalResourceEntry(dest_path, &entry)); 204 EXPECT_EQ(FILE_ERROR_NOT_FOUND, GetLocalResourceEntry(dest_path, &entry));
210 } 205 }
211 206
212 } // namespace file_system 207 } // namespace file_system
213 } // namespace drive 208 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_cache_unittest.cc ('k') | chrome/browser/chromeos/drive/file_system/operation_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698