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

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

Issue 10447043: Move all webkit/fileapi tests to content_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return base::Bind(&FileSystemQuotaTest::DidFinish, AsWeakPtr()); 155 return base::Bind(&FileSystemQuotaTest::DidFinish, AsWeakPtr());
156 } 156 }
157 157
158 void DidFinish(base::PlatformFileError status) { 158 void DidFinish(base::PlatformFileError status) {
159 status_ = status; 159 status_ = status;
160 } 160 }
161 161
162 FileSystemTestOriginHelper test_helper_; 162 FileSystemTestOriginHelper test_helper_;
163 163
164 ScopedTempDir work_dir_; 164 ScopedTempDir work_dir_;
165 MessageLoop message_loop_;
165 scoped_refptr<quota::QuotaManager> quota_manager_; 166 scoped_refptr<quota::QuotaManager> quota_manager_;
166 167
167 base::WeakPtrFactory<FileSystemQuotaTest> weak_factory_; 168 base::WeakPtrFactory<FileSystemQuotaTest> weak_factory_;
168 169
169 int next_unique_path_suffix_; 170 int next_unique_path_suffix_;
170 171
171 // For post-operation status. 172 // For post-operation status.
172 int status_; 173 int status_;
173 quota::QuotaStatusCode quota_status_; 174 quota::QuotaStatusCode quota_status_;
174 int64 usage_; 175 int64 usage_;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 339
339 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, ActualFileSize()); 340 EXPECT_EQ(2 * child_file_size + 3 * grandchild_file_size, ActualFileSize());
340 EXPECT_EQ(expected_usage, SizeByQuotaUtil()); 341 EXPECT_EQ(expected_usage, SizeByQuotaUtil());
341 GetUsageAndQuotaFromQuotaManager(); 342 GetUsageAndQuotaFromQuotaManager();
342 EXPECT_EQ(quota::kQuotaStatusOk, quota_status()); 343 EXPECT_EQ(quota::kQuotaStatusOk, quota_status());
343 EXPECT_EQ(expected_usage, usage()); 344 EXPECT_EQ(expected_usage, usage());
344 ASSERT_LT(expected_usage, quota()); 345 ASSERT_LT(expected_usage, quota());
345 } 346 }
346 347
347 } // namespace fileapi 348 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698