| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 std::set<base::FilePath> changed_paths_; | 61 std::set<base::FilePath> changed_paths_; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 OperationTestBase(); | 64 OperationTestBase(); |
| 65 virtual ~OperationTestBase(); | 65 virtual ~OperationTestBase(); |
| 66 | 66 |
| 67 // testing::Test overrides. | 67 // testing::Test overrides. |
| 68 virtual void SetUp() OVERRIDE; | 68 virtual void SetUp() OVERRIDE; |
| 69 virtual void TearDown() OVERRIDE; | 69 virtual void TearDown() OVERRIDE; |
| 70 | 70 |
| 71 // Returns the path of the temporary directory for putting test files. |
| 72 base::FilePath temp_dir() const { return temp_dir_.path(); } |
| 73 |
| 71 // Synchronously gets the resource entry corresponding to the path from local | 74 // Synchronously gets the resource entry corresponding to the path from local |
| 72 // ResourceMetadta. | 75 // ResourceMetadta. |
| 73 FileError GetLocalResourceEntry(const base::FilePath& path, | 76 FileError GetLocalResourceEntry(const base::FilePath& path, |
| 74 ResourceEntry* entry); | 77 ResourceEntry* entry); |
| 75 | 78 |
| 76 // Accessors for the components. | 79 // Accessors for the components. |
| 77 google_apis::FakeDriveService* fake_service() { | 80 google_apis::FakeDriveService* fake_service() { |
| 78 return fake_drive_service_.get(); | 81 return fake_drive_service_.get(); |
| 79 } | 82 } |
| 80 LoggingObserver* observer() { return &observer_; } | 83 LoggingObserver* observer() { return &observer_; } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 98 scoped_ptr<internal::ResourceMetadata, test_util::DestroyHelperForTests> | 101 scoped_ptr<internal::ResourceMetadata, test_util::DestroyHelperForTests> |
| 99 metadata_; | 102 metadata_; |
| 100 scoped_ptr<FakeFreeDiskSpaceGetter> fake_free_disk_space_getter_; | 103 scoped_ptr<FakeFreeDiskSpaceGetter> fake_free_disk_space_getter_; |
| 101 scoped_ptr<internal::FileCache, test_util::DestroyHelperForTests> cache_; | 104 scoped_ptr<internal::FileCache, test_util::DestroyHelperForTests> cache_; |
| 102 }; | 105 }; |
| 103 | 106 |
| 104 } // namespace file_system | 107 } // namespace file_system |
| 105 } // namespace drive | 108 } // namespace drive |
| 106 | 109 |
| 107 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ | 110 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ |
| OLD | NEW |