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

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

Issue 10870040: Rename FileSystemOperationInterface to FileSystemOperation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing Created 8 years, 3 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 FilePath child_file1_path_; 145 FilePath child_file1_path_;
146 FilePath child_file2_path_; 146 FilePath child_file2_path_;
147 FilePath grandchild_file1_path_; 147 FilePath grandchild_file1_path_;
148 FilePath grandchild_file2_path_; 148 FilePath grandchild_file2_path_;
149 149
150 int64 child_path_cost_; 150 int64 child_path_cost_;
151 int64 grandchild_path_cost_; 151 int64 grandchild_path_cost_;
152 152
153 protected: 153 protected:
154 // Callback for recording test results. 154 // Callback for recording test results.
155 FileSystemOperationInterface::StatusCallback RecordStatusCallback() { 155 FileSystemOperation::StatusCallback RecordStatusCallback() {
156 return base::Bind(&LocalFileSystemQuotaTest::DidFinish, AsWeakPtr()); 156 return base::Bind(&LocalFileSystemQuotaTest::DidFinish, AsWeakPtr());
157 } 157 }
158 158
159 void DidFinish(base::PlatformFileError status) { 159 void DidFinish(base::PlatformFileError status) {
160 status_ = status; 160 status_ = status;
161 } 161 }
162 162
163 LocalFileSystemTestOriginHelper test_helper_; 163 LocalFileSystemTestOriginHelper test_helper_;
164 164
165 ScopedTempDir work_dir_; 165 ScopedTempDir work_dir_;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, ActualFileSize()); 341 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, ActualFileSize());
342 EXPECT_EQ(expected_usage, SizeByQuotaUtil()); 342 EXPECT_EQ(expected_usage, SizeByQuotaUtil());
343 GetUsageAndQuotaFromQuotaManager(); 343 GetUsageAndQuotaFromQuotaManager();
344 EXPECT_EQ(quota::kQuotaStatusOk, quota_status()); 344 EXPECT_EQ(quota::kQuotaStatusOk, quota_status());
345 EXPECT_EQ(expected_usage, usage()); 345 EXPECT_EQ(expected_usage, usage());
346 ASSERT_LT(expected_usage, quota()); 346 ASSERT_LT(expected_usage, quota());
347 } 347 }
348 348
349 } // namespace fileapi 349 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/local_file_system_operation_write_unittest.cc ('k') | webkit/fileapi/media/native_media_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698