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

Unified Diff: webkit/fileapi/file_system_operation_unittest.cc

Issue 7174002: Change {Obfuscated|Local}FileSystemFileUtil non-Singleton to take an underlying *FileUtil. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed memery leak at LocalFSFUTest, and rebased. Created 9 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 side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/file_system_operation_unittest.cc
diff --git a/webkit/fileapi/file_system_operation_unittest.cc b/webkit/fileapi/file_system_operation_unittest.cc
index 9cd6103d2064604d51ba93f2c0a045a01ac2332b..2488b4b552fc5f11b950c91fed081f0596f54212 100644
--- a/webkit/fileapi/file_system_operation_unittest.cc
+++ b/webkit/fileapi/file_system_operation_unittest.cc
@@ -248,6 +248,7 @@ class FileSystemOperationTest : public testing::Test {
std::vector<base::FileUtilProxy::Entry> entries_;
private:
+ scoped_ptr<LocalFileSystemFileUtil> local_file_util_;
scoped_refptr<QuotaManager> quota_manager_;
scoped_refptr<QuotaManagerProxy> quota_manager_proxy_;
DISALLOW_COPY_AND_ASSIGN(FileSystemOperationTest);
@@ -297,6 +298,8 @@ class MockDispatcher : public FileSystemCallbackDispatcher {
void FileSystemOperationTest::SetUp() {
FilePath base_dir = base_.path().AppendASCII("filesystem");
+ local_file_util_.reset(
+ new LocalFileSystemFileUtil(QuotaFileUtil::GetInstance()));
quota_manager_ = new MockQuotaManager(
base_dir, test_helper_.origin(), test_helper_.storage_type());
quota_manager_proxy_ = new MockQuotaManagerProxy(quota_manager_.get());
@@ -304,7 +307,7 @@ void FileSystemOperationTest::SetUp() {
false /* incognito */,
false /* unlimited quota */,
quota_manager_proxy_.get(),
- LocalFileSystemFileUtil::GetInstance());
+ local_file_util_.get());
}
void FileSystemOperationTest::TearDown() {
@@ -313,6 +316,7 @@ void FileSystemOperationTest::TearDown() {
quota_manager_ = NULL;
quota_manager_proxy_ = NULL;
test_helper_.TearDown();
+ local_file_util_.reset();
}
FileSystemOperation* FileSystemOperationTest::operation() {

Powered by Google App Engine
This is Rietveld 408576698