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

Unified Diff: webkit/fileapi/file_system_dir_url_request_job_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: Oops, cleaning up leftover TestSpecialStoragePolicy classes. 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
Index: webkit/fileapi/file_system_dir_url_request_job_unittest.cc
diff --git a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
index 738c64d3c6ec32e6bbd863a8d5bad0dabc738416..ce605652788a0a395094fe85c70b9e573b4c5611 100644
--- a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -33,6 +33,7 @@
#include "webkit/fileapi/file_system_operation_context.h"
#include "webkit/fileapi/file_system_path_manager.h"
#include "webkit/fileapi/sandbox_mount_point_provider.h"
+#include "webkit/quota/mock_special_storage_policy.h"
namespace fileapi {
namespace {
@@ -41,21 +42,6 @@ namespace {
static const char kFileSystemURLPrefix[] =
"filesystem:http://remote/temporary/";
-class TestSpecialStoragePolicy : public quota::SpecialStoragePolicy {
- public:
- virtual bool IsStorageProtected(const GURL& origin) {
- return false;
- }
-
- virtual bool IsStorageUnlimited(const GURL& origin) {
- return true;
michaeln 2011/08/12 18:53:52 The old impl claimed all origins were unlimited (a
marja 2011/08/16 10:54:25 IsStorageUnlimited and IsFileHandler in this file
- }
-
- virtual bool IsFileHandler(const std::string& extension_id) {
- return true;
- }
-};
-
} // namespace
class FileSystemDirURLRequestJobTest : public testing::Test {
@@ -70,7 +56,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
file_thread_proxy_ = base::MessageLoopProxy::CreateForCurrentThread();
- special_storage_policy_ = new TestSpecialStoragePolicy();
+ special_storage_policy_ = new quota::MockSpecialStoragePolicy;
file_system_context_ =
new FileSystemContext(
base::MessageLoopProxy::CreateForCurrentThread(),
@@ -230,7 +216,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
FilePath root_path_;
scoped_ptr<net::URLRequest> request_;
scoped_ptr<TestDelegate> delegate_;
- scoped_refptr<TestSpecialStoragePolicy> special_storage_policy_;
+ scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy_;
scoped_refptr<FileSystemContext> file_system_context_;
base::ScopedCallbackFactory<FileSystemDirURLRequestJobTest> callback_factory_;

Powered by Google App Engine
This is Rietveld 408576698