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

Side by Side Diff: webkit/fileapi/obfuscated_file_system_file_util_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: Rebased. 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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ObfuscatedFileSystemFileUtilTest() 126 ObfuscatedFileSystemFileUtilTest()
127 : origin_(GURL("http://www.example.com")), 127 : origin_(GURL("http://www.example.com")),
128 type_(kFileSystemTypeTemporary), 128 type_(kFileSystemTypeTemporary),
129 test_helper_(origin_, type_) { 129 test_helper_(origin_, type_) {
130 } 130 }
131 131
132 void SetUp() { 132 void SetUp() {
133 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 133 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
134 134
135 obfuscated_file_system_file_util_ = 135 obfuscated_file_system_file_util_ =
136 new ObfuscatedFileSystemFileUtil(data_dir_.path()); 136 new ObfuscatedFileSystemFileUtil(data_dir_.path(),
137 FileSystemFileUtil::GetInstance());
137 test_helper_.SetUp(data_dir_.path(), 138 test_helper_.SetUp(data_dir_.path(),
138 false, // incognito 139 false, // incognito
139 false, // unlimited quota 140 false, // unlimited quota
140 NULL, // quota::QuotaManagerProxy 141 NULL, // quota::QuotaManagerProxy
141 obfuscated_file_system_file_util_.get()); 142 obfuscated_file_system_file_util_.get());
142 } 143 }
143 144
144 FileSystemOperationContext* NewContext() { 145 FileSystemOperationContext* NewContext() {
145 FileSystemOperationContext* context = test_helper_.NewOperationContext(); 146 FileSystemOperationContext* context = test_helper_.NewOperationContext();
146 context->set_allowed_bytes_growth(1024 * 1024);
147 return context; 147 return context;
148 } 148 }
149 149
150 ObfuscatedFileSystemFileUtil* ofsfu() { 150 ObfuscatedFileSystemFileUtil* ofsfu() {
151 return obfuscated_file_system_file_util_.get(); 151 return obfuscated_file_system_file_util_.get();
152 } 152 }
153 153
154 const FilePath& test_directory() const { 154 const FilePath& test_directory() const {
155 return data_dir_.path(); 155 return data_dir_.path();
156 } 156 }
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 } 992 }
993 EXPECT_TRUE(found); 993 EXPECT_TRUE(found);
994 } 994 }
995 995
996 std::set<GURL> diff; 996 std::set<GURL> diff;
997 std::set_symmetric_difference(origins_expected.begin(), 997 std::set_symmetric_difference(origins_expected.begin(),
998 origins_expected.end(), origins_found.begin(), origins_found.end(), 998 origins_expected.end(), origins_found.begin(), origins_found.end(),
999 inserter(diff, diff.begin())); 999 inserter(diff, diff.begin()));
1000 EXPECT_TRUE(diff.empty()); 1000 EXPECT_TRUE(diff.empty());
1001 } 1001 }
OLDNEW
« no previous file with comments | « webkit/fileapi/obfuscated_file_system_file_util.cc ('k') | webkit/fileapi/sandbox_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698