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

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

Issue 9004019: Cleanup: Removing FileSystemPathManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 11 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 // This test checks the entire behavior of FileSystem usage and quota, such as: 5 // This test checks the entire behavior of FileSystem usage and quota, such as:
6 // 1) the actual size of files on disk, 6 // 1) the actual size of files on disk,
7 // 2) the described size in .usage, and 7 // 2) the described size in .usage, and
8 // 3) the result of QuotaManager::GetUsageAndQuota. 8 // 3) the result of QuotaManager::GetUsageAndQuota.
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 file_util::CreateDirectory(filesystem_dir_path); 197 file_util::CreateDirectory(filesystem_dir_path);
198 198
199 quota_manager_ = new quota::QuotaManager( 199 quota_manager_ = new quota::QuotaManager(
200 false /* is_incognito */, 200 false /* is_incognito */,
201 filesystem_dir_path, 201 filesystem_dir_path,
202 base::MessageLoopProxy::current(), 202 base::MessageLoopProxy::current(),
203 base::MessageLoopProxy::current(), 203 base::MessageLoopProxy::current(),
204 NULL); 204 NULL);
205 205
206 test_helper_.SetUp(filesystem_dir_path, 206 test_helper_.SetUp(filesystem_dir_path,
207 false /* incognito */,
208 false /* unlimited quota */, 207 false /* unlimited quota */,
209 quota_manager_->proxy(), 208 quota_manager_->proxy(),
210 local_file_util_.get()); 209 local_file_util_.get());
211 } 210 }
212 211
213 void FileSystemQuotaTest::TearDown() { 212 void FileSystemQuotaTest::TearDown() {
214 quota_manager_ = NULL; 213 quota_manager_ = NULL;
215 test_helper_.TearDown(); 214 test_helper_.TearDown();
216 } 215 }
217 216
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 328
330 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, ActualSize()); 329 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, ActualSize());
331 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, SizeInUsageFile()); 330 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, SizeInUsageFile());
332 GetUsageAndQuotaFromQuotaManager(); 331 GetUsageAndQuotaFromQuotaManager();
333 EXPECT_EQ(quota::kQuotaStatusOk, quota_status()); 332 EXPECT_EQ(quota::kQuotaStatusOk, quota_status());
334 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, usage()); 333 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, usage());
335 ASSERT_LT(2 * child_file_size + 3 * grandchild_file_size, quota()); 334 ASSERT_LT(2 * child_file_size + 3 * grandchild_file_size, quota());
336 } 335 }
337 336
338 } // namespace fileapi 337 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698