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

Unified Diff: webkit/fileapi/sandbox_mount_point_provider_unittest.cc

Issue 7633016: Test cleanup: Using MockSpecialStoragePolicy instead of local subclasses of SpecialStoragePolicy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/file_system_url_request_job_unittest.cc ('k') | webkit/quota/mock_special_storage_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/sandbox_mount_point_provider_unittest.cc
diff --git a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
index d41d46bc4b96fcc0e2c034c2945527fd82988b34..53d94a8980dd6c8618edca1737cca4d28494d11c 100644
--- a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
+++ b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
@@ -22,6 +22,7 @@
#include "webkit/fileapi/file_system_operation_context.h"
#include "webkit/fileapi/file_system_path_manager.h"
#include "webkit/fileapi/file_system_util.h"
+#include "webkit/quota/mock_special_storage_policy.h"
namespace fileapi {
@@ -127,27 +128,6 @@ const MigrationTestCaseRecord kMigrationTestRecords[] = {
{ GURL("file:///"), false, true },
};
-class TestSpecialStoragePolicy : public quota::SpecialStoragePolicy {
- public:
- explicit TestSpecialStoragePolicy(bool unlimited_quota)
- : unlimited_quota_(unlimited_quota) {}
-
- virtual bool IsStorageProtected(const GURL& origin) {
- return false;
- }
-
- virtual bool IsStorageUnlimited(const GURL& origin) {
- return unlimited_quota_;
- }
-
- virtual bool IsFileHandler(const std::string& extension_id) {
- return true;
- }
-
- private:
- bool unlimited_quota_;
-};
-
} // anonymous namespace
class SandboxMountPointProviderMigrationTest : public testing::Test {
@@ -160,10 +140,13 @@ class SandboxMountPointProviderMigrationTest : public testing::Test {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
path_manager_ = new MockFileSystemPathManager(data_dir_.path());
+ scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy =
+ new quota::MockSpecialStoragePolicy;
+ special_storage_policy->SetAllUnlimited(true);
file_system_context_ = new FileSystemContext(
base::MessageLoopProxy::current(),
base::MessageLoopProxy::current(),
- new TestSpecialStoragePolicy(true /* unlimited quota */),
+ special_storage_policy,
NULL,
data_dir_.path(),
false, // incognito
« no previous file with comments | « webkit/fileapi/file_system_url_request_job_unittest.cc ('k') | webkit/quota/mock_special_storage_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698