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

Side by Side Diff: webkit/fileapi/file_system_file_util_unittest.cc

Issue 7312023: Refactoring: Change all -FileUtils non-Singleton and to own underlying FileUtils. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Reflected the comments. Created 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 void TestCrossFileSystemCopyMoveHelper( 70 void TestCrossFileSystemCopyMoveHelper(
71 const GURL& src_origin, fileapi::FileSystemType src_type, 71 const GURL& src_origin, fileapi::FileSystemType src_type,
72 const GURL& dest_origin, fileapi::FileSystemType dest_type, 72 const GURL& dest_origin, fileapi::FileSystemType dest_type,
73 bool copy) { 73 bool copy) {
74 ScopedTempDir base_dir; 74 ScopedTempDir base_dir;
75 ASSERT_TRUE(base_dir.CreateUniqueTempDir()); 75 ASSERT_TRUE(base_dir.CreateUniqueTempDir());
76 scoped_refptr<ObfuscatedFileSystemFileUtil> file_util( 76 scoped_refptr<ObfuscatedFileSystemFileUtil> file_util(
77 new ObfuscatedFileSystemFileUtil(base_dir.path(), 77 new ObfuscatedFileSystemFileUtil(base_dir.path(),
78 FileSystemFileUtil::GetInstance())); 78 new FileSystemFileUtil()));
79 FileSystemTestOriginHelper src_helper(src_origin, src_type); 79 FileSystemTestOriginHelper src_helper(src_origin, src_type);
80 src_helper.SetUp(base_dir.path(), 80 src_helper.SetUp(base_dir.path(),
81 false, // incognito 81 false, // incognito
82 false, // unlimited quota 82 false, // unlimited quota
83 NULL, // quota::QuotaManagerProxy 83 NULL, // quota::QuotaManagerProxy
84 file_util.get()); 84 file_util.get());
85 FileSystemTestOriginHelper dest_helper(dest_origin, dest_type); 85 FileSystemTestOriginHelper dest_helper(dest_origin, dest_type);
86 dest_helper.SetUp(src_helper.file_system_context(), NULL); 86 dest_helper.SetUp(src_helper.file_system_context(), NULL);
87 87
88 // Set up all the source data. 88 // Set up all the source data.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 TestCrossFileSystemCopyMoveHelper(src_origin, type, dest_origin, type, false); 195 TestCrossFileSystemCopyMoveHelper(src_origin, type, dest_origin, type, false);
196 } 196 }
197 197
198 TEST_F(FileSystemFileUtilTest, TestCrossFileSystemMoveSameOrigin) { 198 TEST_F(FileSystemFileUtilTest, TestCrossFileSystemMoveSameOrigin) {
199 GURL origin("http://www.example.com"); 199 GURL origin("http://www.example.com");
200 fileapi::FileSystemType src_type = kFileSystemTypePersistent; 200 fileapi::FileSystemType src_type = kFileSystemTypePersistent;
201 fileapi::FileSystemType dest_type = kFileSystemTypeTemporary; 201 fileapi::FileSystemType dest_type = kFileSystemTypeTemporary;
202 202
203 TestCrossFileSystemCopyMoveHelper(origin, src_type, origin, dest_type, false); 203 TestCrossFileSystemCopyMoveHelper(origin, src_type, origin, dest_type, false);
204 } 204 }
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_file_util.cc ('k') | webkit/fileapi/file_system_operation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698