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

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

Issue 14096022: Make MountPointProvider pluggable from outside webkit/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix etc Created 7 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 work_dir_.path().AppendASCII("filesystem"); 56 work_dir_.path().AppendASCII("filesystem");
57 ASSERT_TRUE(file_util::CreateDirectory(filesystem_dir_path)); 57 ASSERT_TRUE(file_util::CreateDirectory(filesystem_dir_path));
58 58
59 quota_manager_ = new quota::QuotaManager( 59 quota_manager_ = new quota::QuotaManager(
60 false /* is_incognito */, 60 false /* is_incognito */,
61 filesystem_dir_path, 61 filesystem_dir_path,
62 base::MessageLoopProxy::current(), 62 base::MessageLoopProxy::current(),
63 base::MessageLoopProxy::current(), 63 base::MessageLoopProxy::current(),
64 NULL); 64 NULL);
65 65
66 test_helper_.SetUp(filesystem_dir_path, 66 test_helper_.SetUp(filesystem_dir_path, quota_manager_->proxy());
67 false /* unlimited quota */,
68 quota_manager_->proxy());
69 } 67 }
70 68
71 virtual void TearDown() OVERRIDE { 69 virtual void TearDown() OVERRIDE {
72 quota_manager_ = NULL; 70 quota_manager_ = NULL;
73 test_helper_.TearDown(); 71 test_helper_.TearDown();
74 } 72 }
75 73
76 LocalFileSystemOperation* NewOperation() { 74 LocalFileSystemOperation* NewOperation() {
77 return test_helper_.NewOperation(); 75 return test_helper_.NewOperation();
78 } 76 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 338
341 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, ActualFileSize()); 339 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, ActualFileSize());
342 EXPECT_EQ(expected_usage, SizeByQuotaUtil()); 340 EXPECT_EQ(expected_usage, SizeByQuotaUtil());
343 GetUsageAndQuotaFromQuotaManager(); 341 GetUsageAndQuotaFromQuotaManager();
344 EXPECT_EQ(quota::kQuotaStatusOk, quota_status()); 342 EXPECT_EQ(quota::kQuotaStatusOk, quota_status());
345 EXPECT_EQ(expected_usage, usage()); 343 EXPECT_EQ(expected_usage, usage());
346 ASSERT_LT(expected_usage, quota()); 344 ASSERT_LT(expected_usage, quota());
347 } 345 }
348 346
349 } // namespace fileapi 347 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/local_file_system_operation_write_unittest.cc ('k') | webkit/fileapi/local_file_system_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698