diff options
author | pilgrim@chromium.org <pilgrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 21:46:25 +0000 |
---|---|---|
committer | pilgrim@chromium.org <pilgrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 21:46:25 +0000 |
commit | 523e5c590175633e4a0887e9b02808d40b7835e2 (patch) | |
tree | e81e8aead747e0394ee29f2f1e46a0a637586843 | |
parent | 559a9a4fd35509a6acd6a10bb463230e1512eb1b (diff) | |
download | chromium_src-523e5c590175633e4a0887e9b02808d40b7835e2.zip chromium_src-523e5c590175633e4a0887e9b02808d40b7835e2.tar.gz chromium_src-523e5c590175633e4a0887e9b02808d40b7835e2.tar.bz2 |
Move mock_special_storage_policy from webkit/ to content/public/test/
BUG=338338
TBR=darin@chromium.org
Review URL: https://codereview.chromium.org/259083002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267345 0039d316-1c4b-4281-b951-d872f2087c98
29 files changed, 101 insertions, 110 deletions
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc b/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc index c804f76..054c01b 100644 --- a/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc +++ b/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc @@ -9,11 +9,11 @@ #include "base/files/file_path.h" #include "base/path_service.h" #include "chromeos/dbus/cros_disks_client.h" +#include "content/public/test/mock_special_storage_policy.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/url_util.h" #include "webkit/browser/fileapi/external_mount_points.h" #include "webkit/browser/fileapi/file_system_url.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #define FPL(x) FILE_PATH_LITERAL(x) @@ -37,7 +37,7 @@ TEST(ChromeOSFileSystemBackendTest, DefaultMountPoints) { fileapi::ExternalMountPoints::GetSystemInstance()->RevokeAllFileSystems(); scoped_refptr<quota::SpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + new content::MockSpecialStoragePolicy(); scoped_refptr<fileapi::ExternalMountPoints> mount_points( fileapi::ExternalMountPoints::CreateRefCounted()); chromeos::FileSystemBackend backend( @@ -63,7 +63,7 @@ TEST(ChromeOSFileSystemBackendTest, DefaultMountPoints) { TEST(ChromeOSFileSystemBackendTest, GetRootDirectories) { scoped_refptr<quota::SpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + new content::MockSpecialStoragePolicy(); scoped_refptr<fileapi::ExternalMountPoints> mount_points( fileapi::ExternalMountPoints::CreateRefCounted()); @@ -111,8 +111,8 @@ TEST(ChromeOSFileSystemBackendTest, GetRootDirectories) { TEST(ChromeOSFileSystemBackendTest, AccessPermissions) { url::AddStandardScheme("chrome-extension"); - scoped_refptr<quota::MockSpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + scoped_refptr<content::MockSpecialStoragePolicy> storage_policy = + new content::MockSpecialStoragePolicy(); scoped_refptr<fileapi::ExternalMountPoints> mount_points( fileapi::ExternalMountPoints::CreateRefCounted()); scoped_refptr<fileapi::ExternalMountPoints> system_mount_points( @@ -205,8 +205,8 @@ TEST(ChromeOSFileSystemBackendTest, AccessPermissions) { } TEST(ChromeOSFileSystemBackendTest, GetVirtualPathConflictWithSystemPoints) { - scoped_refptr<quota::MockSpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + scoped_refptr<content::MockSpecialStoragePolicy> storage_policy = + new content::MockSpecialStoragePolicy(); scoped_refptr<fileapi::ExternalMountPoints> mount_points( fileapi::ExternalMountPoints::CreateRefCounted()); scoped_refptr<fileapi::ExternalMountPoints> system_mount_points( diff --git a/chrome/browser/extensions/mock_extension_special_storage_policy.h b/chrome/browser/extensions/mock_extension_special_storage_policy.h index 5fb958d..0e9f021 100644 --- a/chrome/browser/extensions/mock_extension_special_storage_policy.h +++ b/chrome/browser/extensions/mock_extension_special_storage_policy.h @@ -12,7 +12,7 @@ #include "url/gurl.h" // This class is the same as MockSpecialStoragePolicy (in -// webkit/browser/quota/mock_special_storage_policy.h), but it inherits +// content/public/test/mock_special_storage_policy.h), but it inherits // ExtensionSpecialStoragePolicy instead of quota::SpecialStoragePolicy. class MockExtensionSpecialStoragePolicy : public ExtensionSpecialStoragePolicy { public: diff --git a/chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc index 9ffcceb..13c7fb1 100644 --- a/chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc @@ -20,6 +20,7 @@ #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" #include "chrome/browser/media_galleries/imported_media_gallery_registry.h" #include "content/public/browser/browser_thread.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_browser_thread.h" #include "content/public/test/test_file_system_options.h" #include "testing/gtest/include/gtest/gtest.h" @@ -28,7 +29,6 @@ #include "webkit/browser/fileapi/file_system_context.h" #include "webkit/browser/fileapi/file_system_operation_context.h" #include "webkit/browser/fileapi/file_system_operation_runner.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" using fileapi::FileSystemOperationContext; using fileapi::FileSystemOperation; @@ -189,7 +189,7 @@ class IPhotoFileUtilTest : public testing::Test { ImportedMediaGalleryRegistry::GetInstance()->Initialize(); scoped_refptr<quota::SpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + new content::MockSpecialStoragePolicy(); // Initialize fake IPhotoDataProvider on media task runner thread. MediaFileSystemBackend::MediaTaskRunner()->PostTask( diff --git a/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc index 11b5973..81d9083 100644 --- a/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc @@ -19,6 +19,7 @@ #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" #include "chrome/browser/media_galleries/imported_media_gallery_registry.h" #include "content/public/browser/browser_thread.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_browser_thread.h" #include "content/public/test/test_file_system_options.h" #include "testing/gtest/include/gtest/gtest.h" @@ -27,7 +28,6 @@ #include "webkit/browser/fileapi/file_system_context.h" #include "webkit/browser/fileapi/file_system_operation_context.h" #include "webkit/browser/fileapi/file_system_operation_runner.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" using fileapi::FileSystemOperationContext; using fileapi::FileSystemOperation; @@ -157,7 +157,7 @@ class ItunesFileUtilTest : public testing::Test { ImportedMediaGalleryRegistry::GetInstance()->Initialize(); scoped_refptr<quota::SpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + new content::MockSpecialStoragePolicy(); // Initialize fake ItunesDataProvider on media task runner thread. MediaFileSystemBackend::MediaTaskRunner()->PostTask( diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc index 0b20d58..7a96738 100644 --- a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc @@ -15,6 +15,7 @@ #include "base/time/time.h" #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_browser_thread.h" #include "content/public/test/test_file_system_options.h" #include "testing/gtest/include/gtest/gtest.h" @@ -25,7 +26,6 @@ #include "webkit/browser/fileapi/file_system_url.h" #include "webkit/browser/fileapi/isolated_context.h" #include "webkit/browser/fileapi/native_file_util.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #define FPL(x) FILE_PATH_LITERAL(x) @@ -120,7 +120,7 @@ class NativeMediaFileUtilTest : public testing::Test { ASSERT_TRUE(base::CreateDirectory(root_path())); scoped_refptr<quota::SpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + new content::MockSpecialStoragePolicy(); ScopedVector<fileapi::FileSystemBackend> additional_providers; additional_providers.push_back(new MediaFileSystemBackend( diff --git a/chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc index b117847..2046075 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc @@ -26,6 +26,7 @@ #include "chrome/common/media_galleries/picasa_types.h" #include "chrome/common/media_galleries/pmp_constants.h" #include "content/public/browser/browser_thread.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_browser_thread.h" #include "content/public/test/test_file_system_options.h" #include "testing/gtest/include/gtest/gtest.h" @@ -35,7 +36,6 @@ #include "webkit/browser/fileapi/file_system_operation_context.h" #include "webkit/browser/fileapi/file_system_operation_runner.h" #include "webkit/browser/fileapi/isolated_context.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/common/blob/shareable_file_reference.h" using fileapi::FileSystemOperationContext; @@ -232,7 +232,7 @@ class PicasaFileUtilTest : public testing::Test { ImportedMediaGalleryRegistry::GetInstance()->Initialize(); scoped_refptr<quota::SpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + new content::MockSpecialStoragePolicy(); SynchronouslyRunOnMediaTaskRunner(base::Bind( &PicasaFileUtilTest::SetUpOnMediaTaskRunner, base::Unretained(this))); diff --git a/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc b/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc index 1691274..5afb73d 100644 --- a/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc +++ b/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc @@ -12,13 +12,13 @@ #include "base/stl_util.h" #include "chrome/browser/net/sqlite_server_bound_cert_store.h" #include "chrome/common/chrome_constants.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_browser_thread_bundle.h" #include "net/base/test_data_directory.h" #include "net/ssl/ssl_client_cert_type.h" #include "net/test/cert_test_util.h" #include "sql/statement.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" class SQLiteServerBoundCertStoreTest : public testing::Test { public: diff --git a/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc b/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc index 2c7a56b..4da0015 100644 --- a/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc +++ b/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc @@ -22,6 +22,7 @@ #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" #include "chrome/browser/sync_file_system/syncable_file_system_util.h" #include "content/public/test/mock_blob_url_request_context.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_file_system_options.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/browser/fileapi/external_mount_points.h" @@ -29,7 +30,6 @@ #include "webkit/browser/fileapi/file_system_context.h" #include "webkit/browser/fileapi/file_system_operation_context.h" #include "webkit/browser/fileapi/file_system_operation_runner.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_manager.h" #include "webkit/common/blob/shareable_file_reference.h" @@ -227,7 +227,7 @@ void CannedSyncableFileSystem::SetUp(QuotaMode quota_mode) { ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); scoped_refptr<quota::SpecialStoragePolicy> storage_policy = - new quota::MockSpecialStoragePolicy(); + new content::MockSpecialStoragePolicy(); if (quota_mode == QUOTA_ENABLED) { quota_manager_ = new QuotaManager(false /* is_incognito */, diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi index b1d773c0..2768f85 100644 --- a/chrome/chrome_tests_unit.gypi +++ b/chrome/chrome_tests_unit.gypi @@ -475,7 +475,7 @@ # 2) test-specific support libraries: '../base/base.gyp:test_support_base', '../components/components_resources.gyp:components_resources', - '../content/content_shell_and_tests.gyp:webkit_test_support_content', + '../content/content_shell_and_tests.gyp:test_support_content', '../content/content.gyp:content_app_both', '../net/net.gyp:net', '../net/net.gyp:net_test_support', diff --git a/content/browser/appcache/chrome_appcache_service_unittest.cc b/content/browser/appcache/chrome_appcache_service_unittest.cc index 8195c4a..ba0e144 100644 --- a/content/browser/appcache/chrome_appcache_service_unittest.cc +++ b/content/browser/appcache/chrome_appcache_service_unittest.cc @@ -10,13 +10,13 @@ #include "content/browser/appcache/chrome_appcache_service.h" #include "content/browser/browser_thread_impl.h" #include "content/public/browser/resource_context.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_browser_context.h" #include "content/test/appcache_test_helper.h" #include "net/url_request/url_request_context_getter.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/browser/appcache/appcache_database.h" #include "webkit/browser/appcache/appcache_storage_impl.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include <set> @@ -96,8 +96,8 @@ ChromeAppCacheServiceTest::CreateAppCacheService( bool init_storage) { scoped_refptr<ChromeAppCacheService> appcache_service = new ChromeAppCacheService(NULL); - scoped_refptr<quota::MockSpecialStoragePolicy> mock_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> mock_policy = + new MockSpecialStoragePolicy; mock_policy->AddProtected(kProtectedManifestURL.GetOrigin()); mock_policy->AddSessionOnly(kSessionOnlyManifestURL.GetOrigin()); scoped_refptr<MockURLRequestContextGetter> mock_request_context_getter = diff --git a/webkit/browser/database/database_tracker_unittest.cc b/content/browser/database_tracker_unittest.cc index 2e8b121..baece0a 100644 --- a/webkit/browser/database/database_tracker_unittest.cc +++ b/content/browser/database_tracker_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,16 +11,19 @@ #include "base/message_loop/message_loop_proxy.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "content/public/test/mock_special_storage_policy.h" #include "net/base/net_errors.h" #include "net/base/test_completion_callback.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/sqlite/sqlite3.h" #include "webkit/browser/database/database_tracker.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_manager_proxy.h" #include "webkit/common/database/database_identifier.h" using base::ASCIIToUTF16; +using webkit_database::DatabaseConnections; +using webkit_database::DatabaseTracker; +using webkit_database::OriginInfo; namespace { @@ -182,10 +185,10 @@ bool EnsureFileOfSize(const base::FilePath& file_path, int64 length) { } // namespace -namespace webkit_database { +namespace content { // We declare a helper class, and make it a friend of DatabaseTracker using -// the FRIEND_TEST() macro, and we implement all tests we want to run as +// the FORWARD_DECLARE_TEST macro, and we implement all tests we want to run as // static methods of this class. Then we make our TEST() targets call these // static functions. This allows us to run each test in normal mode and // incognito mode without writing the same code twice. @@ -195,8 +198,8 @@ class DatabaseTracker_TestHelper_Test { // Initialize the tracker database. base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> special_storage_policy = + new MockSpecialStoragePolicy; special_storage_policy->AddProtected(GURL(kOrigin2Url)); scoped_refptr<DatabaseTracker> tracker( new DatabaseTracker(temp_dir.path(), @@ -303,8 +306,8 @@ class DatabaseTracker_TestHelper_Test { // Initialize the tracker database. base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> special_storage_policy = + new MockSpecialStoragePolicy; special_storage_policy->AddProtected(GURL(kOrigin2Url)); scoped_refptr<DatabaseTracker> tracker( new DatabaseTracker(temp_dir.path(), @@ -562,8 +565,8 @@ class DatabaseTracker_TestHelper_Test { base::FilePath origin1_db_dir; base::FilePath origin2_db_dir; { - scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> special_storage_policy = + new MockSpecialStoragePolicy; special_storage_policy->AddSessionOnly(GURL(kOrigin2Url)); scoped_refptr<DatabaseTracker> tracker( new DatabaseTracker(temp_dir.path(), @@ -642,8 +645,8 @@ class DatabaseTracker_TestHelper_Test { base::FilePath origin1_db_dir; base::FilePath origin2_db_dir; { - scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> special_storage_policy = + new MockSpecialStoragePolicy; special_storage_policy->AddSessionOnly(GURL(kOrigin2Url)); scoped_refptr<DatabaseTracker> tracker( new DatabaseTracker(temp_dir.path(), @@ -809,8 +812,9 @@ class DatabaseTracker_TestHelper_Test { // Create another record of a database in the tracker db and create // a spoof_db_file on disk in the expected location. tracker->DatabaseOpened(kOriginId, kName, kDescription, 0, - &database_size); - base::FilePath spoof_db_file2 = tracker->GetFullDBFilePath(kOriginId, kName); + &database_size); + base::FilePath spoof_db_file2 = tracker->GetFullDBFilePath(kOriginId, + kName); EXPECT_FALSE(tracker->GetFullDBFilePath(kOriginId, kName).empty()); EXPECT_NE(spoof_db_file, spoof_db_file2); EXPECT_TRUE(base::CreateDirectory(spoof_db_file2.DirName())); @@ -868,4 +872,4 @@ TEST(DatabaseTrackerTest, HandleSqliteError) { DatabaseTracker_TestHelper_Test::HandleSqliteError(); } -} // namespace webkit_database +} // namespace content diff --git a/content/browser/dom_storage/dom_storage_context_impl_unittest.cc b/content/browser/dom_storage/dom_storage_context_impl_unittest.cc index 85b16a5..d29741f 100644 --- a/content/browser/dom_storage/dom_storage_context_impl_unittest.cc +++ b/content/browser/dom_storage/dom_storage_context_impl_unittest.cc @@ -17,8 +17,8 @@ #include "content/public/browser/local_storage_usage_info.h" #include "content/public/browser/session_storage_namespace.h" #include "content/public/browser/session_storage_usage_info.h" +#include "content/public/test/mock_special_storage_policy.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" using base::ASCIIToUTF16; @@ -42,7 +42,7 @@ class DOMStorageContextImplTest : public testing::Test { virtual void SetUp() { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); - storage_policy_ = new quota::MockSpecialStoragePolicy; + storage_policy_ = new MockSpecialStoragePolicy; task_runner_ = new MockDOMStorageTaskRunner(base::MessageLoopProxy::current().get()); context_ = new DOMStorageContextImpl(temp_dir_.path(), @@ -69,7 +69,7 @@ class DOMStorageContextImplTest : public testing::Test { protected: base::MessageLoop message_loop_; base::ScopedTempDir temp_dir_; - scoped_refptr<quota::MockSpecialStoragePolicy> storage_policy_; + scoped_refptr<MockSpecialStoragePolicy> storage_policy_; scoped_refptr<MockDOMStorageTaskRunner> task_runner_; scoped_refptr<DOMStorageContextImpl> context_; DISALLOW_COPY_AND_ASSIGN(DOMStorageContextImplTest); diff --git a/content/browser/fileapi/copy_or_move_file_validator_unittest.cc b/content/browser/fileapi/copy_or_move_file_validator_unittest.cc index be0f94b..cdc92ce 100644 --- a/content/browser/fileapi/copy_or_move_file_validator_unittest.cc +++ b/content/browser/fileapi/copy_or_move_file_validator_unittest.cc @@ -8,6 +8,7 @@ #include "base/files/scoped_temp_dir.h" #include "base/run_loop.h" #include "content/public/test/async_file_test_helper.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_file_system_backend.h" #include "content/public/test/test_file_system_context.h" #include "testing/gtest/include/gtest/gtest.h" @@ -17,7 +18,6 @@ #include "webkit/browser/fileapi/file_system_context.h" #include "webkit/browser/fileapi/file_system_url.h" #include "webkit/browser/fileapi/isolated_context.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/common/blob/shareable_file_reference.h" #include "webkit/common/fileapi/file_system_util.h" diff --git a/content/browser/fileapi/file_system_context_unittest.cc b/content/browser/fileapi/file_system_context_unittest.cc index 0e6d582..1974ca1 100644 --- a/content/browser/fileapi/file_system_context_unittest.cc +++ b/content/browser/fileapi/file_system_context_unittest.cc @@ -8,12 +8,12 @@ #include "base/message_loop/message_loop.h" #include "base/strings/stringprintf.h" #include "content/browser/quota/mock_quota_manager.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_file_system_options.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/browser/fileapi/external_mount_points.h" #include "webkit/browser/fileapi/file_system_backend.h" #include "webkit/browser/fileapi/isolated_context.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #define FPL(x) FILE_PATH_LITERAL(x) @@ -53,7 +53,7 @@ class FileSystemContextTest : public testing::Test { virtual void SetUp() { ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); - storage_policy_ = new quota::MockSpecialStoragePolicy(); + storage_policy_ = new MockSpecialStoragePolicy(); mock_quota_manager_ = new MockQuotaManager(false /* is_incognito */, diff --git a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc index 3b4c73f..29eb704 100644 --- a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc +++ b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc @@ -17,6 +17,7 @@ #include "base/run_loop.h" #include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_file_system_backend.h" #include "content/public/test/test_file_system_context.h" #include "net/base/net_errors.h" @@ -33,7 +34,6 @@ #include "webkit/browser/fileapi/file_system_file_util.h" #include "webkit/browser/fileapi/file_system_operation_context.h" #include "webkit/browser/fileapi/file_system_url.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" using fileapi::FileSystemContext; using fileapi::FileSystemOperationContext; @@ -83,7 +83,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test { virtual void SetUp() OVERRIDE { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); - special_storage_policy_ = new quota::MockSpecialStoragePolicy; + special_storage_policy_ = new MockSpecialStoragePolicy; file_system_context_ = CreateFileSystemContextForTesting( NULL, temp_dir_.path()); @@ -271,7 +271,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test { net::URLRequestContext empty_context_; scoped_ptr<net::TestDelegate> delegate_; scoped_ptr<net::URLRequest> request_; - scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy_; + scoped_refptr<MockSpecialStoragePolicy> special_storage_policy_; scoped_refptr<FileSystemContext> file_system_context_; base::WeakPtrFactory<FileSystemDirURLRequestJobTest> weak_factory_; diff --git a/content/browser/fileapi/obfuscated_file_util_unittest.cc b/content/browser/fileapi/obfuscated_file_util_unittest.cc index f436c7b..2aed9d1 100644 --- a/content/browser/fileapi/obfuscated_file_util_unittest.cc +++ b/content/browser/fileapi/obfuscated_file_util_unittest.cc @@ -16,6 +16,7 @@ #include "base/run_loop.h" #include "content/browser/fileapi/mock_file_change_observer.h" #include "content/public/test/async_file_test_helper.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/sandbox_file_system_test_helper.h" #include "content/public/test/test_file_system_context.h" #include "content/test/fileapi_test_file_set.h" @@ -30,7 +31,6 @@ #include "webkit/browser/fileapi/sandbox_file_system_backend_delegate.h" #include "webkit/browser/fileapi/sandbox_isolated_origin_database.h" #include "webkit/browser/fileapi/sandbox_origin_database.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_manager.h" #include "webkit/common/database/database_identifier.h" #include "webkit/common/quota/quota_types.h" @@ -157,7 +157,7 @@ class ObfuscatedFileUtilTest : public testing::Test { virtual void SetUp() { ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); - storage_policy_ = new quota::MockSpecialStoragePolicy(); + storage_policy_ = new MockSpecialStoragePolicy(); quota_manager_ = new quota::QuotaManager(false /* is_incognito */, @@ -805,7 +805,7 @@ class ObfuscatedFileUtilTest : public testing::Test { protected: base::ScopedTempDir data_dir_; base::MessageLoop message_loop_; - scoped_refptr<quota::MockSpecialStoragePolicy> storage_policy_; + scoped_refptr<MockSpecialStoragePolicy> storage_policy_; scoped_refptr<quota::QuotaManager> quota_manager_; scoped_refptr<FileSystemContext> file_system_context_; GURL origin_; diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc index bf253f4..6fa627b 100644 --- a/content/browser/indexed_db/indexed_db_unittest.cc +++ b/content/browser/indexed_db/indexed_db_unittest.cc @@ -13,9 +13,9 @@ #include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h" #include "content/public/browser/storage_partition.h" #include "content/public/common/url_constants.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_browser_context.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_manager.h" #include "webkit/browser/quota/special_storage_policy.h" #include "webkit/common/database/database_identifier.h" @@ -31,7 +31,7 @@ class IndexedDBTest : public testing::Test { : kNormalOrigin("http://normal/"), kSessionOnlyOrigin("http://session-only/"), task_runner_(new base::TestSimpleTaskRunner), - special_storage_policy_(new quota::MockSpecialStoragePolicy), + special_storage_policy_(new MockSpecialStoragePolicy), file_thread_(BrowserThread::FILE_USER_BLOCKING, &message_loop_), io_thread_(BrowserThread::IO, &message_loop_) { special_storage_policy_->AddSessionOnly(kSessionOnlyOrigin); @@ -42,7 +42,7 @@ class IndexedDBTest : public testing::Test { base::MessageLoopForIO message_loop_; scoped_refptr<base::TestSimpleTaskRunner> task_runner_; - scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy_; + scoped_refptr<MockSpecialStoragePolicy> special_storage_policy_; private: BrowserThreadImpl file_thread_; diff --git a/content/browser/quota/mock_quota_manager_unittest.cc b/content/browser/quota/mock_quota_manager_unittest.cc index a66477c..e1885c4 100644 --- a/content/browser/quota/mock_quota_manager_unittest.cc +++ b/content/browser/quota/mock_quota_manager_unittest.cc @@ -11,14 +11,13 @@ #include "base/message_loop/message_loop_proxy.h" #include "base/run_loop.h" #include "content/browser/quota/mock_quota_manager.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/mock_storage_client.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" using quota::kQuotaStatusOk; using quota::kStorageTypePersistent; using quota::kStorageTypeTemporary; -using quota::MockSpecialStoragePolicy; namespace content { diff --git a/content/browser/quota/quota_database_unittest.cc b/content/browser/quota/quota_database_unittest.cc index 9055436..1415ed5 100644 --- a/content/browser/quota/quota_database_unittest.cc +++ b/content/browser/quota/quota_database_unittest.cc @@ -11,18 +11,17 @@ #include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/message_loop/message_loop.h" +#include "content/public/test/mock_special_storage_policy.h" #include "sql/connection.h" #include "sql/meta_table.h" #include "sql/statement.h" #include "sql/transaction.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_database.h" using quota::kStorageTypePersistent; using quota::kStorageTypeTemporary; -using quota::MockSpecialStoragePolicy; using quota::QuotaDatabase; namespace content { diff --git a/content/browser/quota/quota_manager_unittest.cc b/content/browser/quota/quota_manager_unittest.cc index 0badd80..5baa025 100644 --- a/content/browser/quota/quota_manager_unittest.cc +++ b/content/browser/quota/quota_manager_unittest.cc @@ -17,10 +17,10 @@ #include "base/stl_util.h" #include "base/sys_info.h" #include "base/time/time.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/mock_storage_client.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_database.h" #include "webkit/browser/quota/quota_manager.h" #include "webkit/browser/quota/quota_manager_proxy.h" @@ -35,7 +35,6 @@ using quota::kStorageTypePersistent; using quota::kStorageTypeSyncable; using quota::kStorageTypeTemporary; using quota::kStorageTypeUnknown; -using quota::MockSpecialStoragePolicy; using quota::QuotaClient; using quota::QuotaManager; using quota::QuotaStatusCode; diff --git a/content/browser/quota/storage_monitor_unittest.cc b/content/browser/quota/storage_monitor_unittest.cc index 132fa5f4..5926e9a 100644 --- a/content/browser/quota/storage_monitor_unittest.cc +++ b/content/browser/quota/storage_monitor_unittest.cc @@ -8,10 +8,10 @@ #include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_proxy.h" #include "base/run_loop.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/mock_storage_client.h" #include "net/base/net_util.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_manager.h" #include "webkit/browser/quota/quota_manager_proxy.h" #include "webkit/browser/quota/storage_monitor.h" @@ -22,7 +22,6 @@ using quota::kQuotaErrorNotSupported; using quota::kQuotaStatusOk; using quota::kStorageTypePersistent; using quota::kStorageTypeTemporary; -using quota::MockSpecialStoragePolicy; using quota::QuotaClient; using quota::QuotaManager; using quota::QuotaStatusCode; diff --git a/content/browser/quota/usage_tracker_unittest.cc b/content/browser/quota/usage_tracker_unittest.cc index 5503b91..3cba8bd 100644 --- a/content/browser/quota/usage_tracker_unittest.cc +++ b/content/browser/quota/usage_tracker_unittest.cc @@ -4,14 +4,13 @@ #include "base/bind.h" #include "base/run_loop.h" +#include "content/public/test/mock_special_storage_policy.h" #include "net/base/net_util.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/usage_tracker.h" using quota::kQuotaStatusOk; using quota::kStorageTypeTemporary; -using quota::MockSpecialStoragePolicy; using quota::QuotaClient; using quota::QuotaClientList; using quota::SpecialStoragePolicy; diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc index 5a8eed7..5fbdfbb 100644 --- a/content/browser/storage_partition_impl_unittest.cc +++ b/content/browser/storage_partition_impl_unittest.cc @@ -12,6 +12,7 @@ #include "content/browser/storage_partition_impl.h" #include "content/public/browser/local_storage_usage_info.h" #include "content/public/browser/storage_partition.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_browser_context.h" #include "content/public/test/test_browser_thread.h" #include "content/public/test/test_browser_thread_bundle.h" @@ -20,7 +21,6 @@ #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context_getter.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_manager.h" namespace content { @@ -669,8 +669,8 @@ TEST_F(StoragePartitionImplTest, RemoveQuotaManagedDataForLastWeek) { TEST_F(StoragePartitionImplTest, RemoveQuotaManagedUnprotectedOrigins) { // Protect kOrigin1. - scoped_refptr<quota::MockSpecialStoragePolicy> mock_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> mock_policy = + new MockSpecialStoragePolicy; mock_policy->AddProtected(kOrigin1.GetOrigin()); PopulateTestQuotaManagedData(GetMockManager()); @@ -705,8 +705,8 @@ TEST_F(StoragePartitionImplTest, RemoveQuotaManagedUnprotectedOrigins) { TEST_F(StoragePartitionImplTest, RemoveQuotaManagedProtectedSpecificOrigin) { // Protect kOrigin1. - scoped_refptr<quota::MockSpecialStoragePolicy> mock_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> mock_policy = + new MockSpecialStoragePolicy; mock_policy->AddProtected(kOrigin1.GetOrigin()); PopulateTestQuotaManagedData(GetMockManager()); @@ -742,8 +742,8 @@ TEST_F(StoragePartitionImplTest, RemoveQuotaManagedProtectedSpecificOrigin) { TEST_F(StoragePartitionImplTest, RemoveQuotaManagedProtectedOrigins) { // Protect kOrigin1. - scoped_refptr<quota::MockSpecialStoragePolicy> mock_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> mock_policy = + new MockSpecialStoragePolicy; mock_policy->AddProtected(kOrigin1.GetOrigin()); PopulateTestQuotaManagedData(GetMockManager()); @@ -842,8 +842,8 @@ TEST_F(StoragePartitionImplTest, RemoveCookieLastHour) { TEST_F(StoragePartitionImplTest, RemoveUnprotectedLocalStorageForever) { // Protect kOrigin1. - scoped_refptr<quota::MockSpecialStoragePolicy> mock_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> mock_policy = + new MockSpecialStoragePolicy; mock_policy->AddProtected(kOrigin1.GetOrigin()); RemoveLocalStorageTester tester(browser_context()); @@ -874,8 +874,8 @@ TEST_F(StoragePartitionImplTest, RemoveUnprotectedLocalStorageForever) { TEST_F(StoragePartitionImplTest, RemoveProtectedLocalStorageForever) { // Protect kOrigin1. - scoped_refptr<quota::MockSpecialStoragePolicy> mock_policy = - new quota::MockSpecialStoragePolicy; + scoped_refptr<MockSpecialStoragePolicy> mock_policy = + new MockSpecialStoragePolicy; mock_policy->AddProtected(kOrigin1.GetOrigin()); RemoveLocalStorageTester tester(browser_context()); diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 74c502c..e9972dd 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -16,7 +16,7 @@ ['OS!="ios"', { # layouttest_support_content is not supported nor required on iOS. 'dependencies': [ - 'webkit_test_support_content', + 'test_support_content', '../skia/skia.gyp:skia', '../ui/accessibility/accessibility.gyp:ax_gen', '../v8/tools/gyp/v8.gyp:v8', @@ -58,11 +58,11 @@ '../ui/gfx/gfx.gyp:gfx_test_support', '../ui/resources/ui_resources.gyp:ui_resources', '../url/url.gyp:url_lib', + '../webkit/common/webkit_common.gyp:webkit_common', 'browser/speech/proto/speech_proto.gyp:speech_proto', 'content.gyp:content_app_both', 'content.gyp:content_browser', 'content.gyp:content_common', - 'webkit_test_support_content', ], 'include_dirs': [ '..', @@ -95,6 +95,8 @@ 'public/test/mock_render_thread.h', 'public/test/mock_resource_context.cc', 'public/test/mock_resource_context.h', + 'public/test/mock_special_storage_policy.cc', + 'public/test/mock_special_storage_policy.h', 'public/test/mock_storage_client.cc', 'public/test/mock_storage_client.h', 'public/test/render_view_test.cc', @@ -332,23 +334,6 @@ ], }, { - 'target_name': 'webkit_test_support_content', - 'type': 'static_library', - 'dependencies': [ - '../webkit/common/webkit_common.gyp:webkit_common', - ], - 'include_dirs': [ - '..', - ], - 'export_dependent_settings': [ - '../webkit/common/webkit_common.gyp:webkit_common', - ], - 'sources': [ - '../webkit/browser/quota/mock_special_storage_policy.cc', - '../webkit/browser/quota/mock_special_storage_policy.h', - ], - }, - { 'target_name': 'content_unittests', 'type': '<(gtest_target_type)', 'dependencies': [ @@ -408,6 +393,7 @@ 'browser/child_process_security_policy_unittest.cc', 'browser/compositor/software_browser_compositor_output_surface_unittest.cc', 'browser/compositor/software_output_device_ozone_unittest.cc', + 'browser/database_tracker_unittest.cc', 'browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc', 'browser/device_sensors/sensor_manager_android_unittest.cc', 'browser/devtools/devtools_http_handler_unittest.cc', @@ -692,7 +678,6 @@ 'test/run_all_unittests.cc', '../webkit/browser/blob/local_file_stream_reader_unittest.cc', '../webkit/browser/database/database_quota_client_unittest.cc', - '../webkit/browser/database/database_tracker_unittest.cc', '../webkit/browser/database/database_util_unittest.cc', '../webkit/browser/database/databases_table_unittest.cc', '../webkit/browser/fileapi/sandbox_database_test_helper.cc', diff --git a/webkit/browser/quota/mock_special_storage_policy.cc b/content/public/test/mock_special_storage_policy.cc index 027a35d..6704f61 100644 --- a/webkit/browser/quota/mock_special_storage_policy.cc +++ b/content/public/test/mock_special_storage_policy.cc @@ -1,12 +1,12 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/browser/quota/mock_special_storage_policy.h" +#include "content/public/test/mock_special_storage_policy.h" #include "base/stl_util.h" -namespace quota { +namespace content { MockSpecialStoragePolicy::MockSpecialStoragePolicy() : all_unlimited_(false) { @@ -44,4 +44,4 @@ bool MockSpecialStoragePolicy::HasSessionOnlyOrigins() { MockSpecialStoragePolicy::~MockSpecialStoragePolicy() {} -} // namespace quota +} // namespace content diff --git a/webkit/browser/quota/mock_special_storage_policy.h b/content/public/test/mock_special_storage_policy.h index 80f64bc..83f7cc9 100644 --- a/webkit/browser/quota/mock_special_storage_policy.h +++ b/content/public/test/mock_special_storage_policy.h @@ -1,9 +1,9 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ -#define WEBKIT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ +#ifndef CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ +#define CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ #include <set> #include <string> @@ -11,7 +11,9 @@ #include "url/gurl.h" #include "webkit/browser/quota/special_storage_policy.h" -namespace quota { +using quota::SpecialStoragePolicy; + +namespace content { class MockSpecialStoragePolicy : public quota::SpecialStoragePolicy { public: @@ -96,6 +98,6 @@ class MockSpecialStoragePolicy : public quota::SpecialStoragePolicy { bool all_unlimited_; }; -} // namespace quota +} // namespace content -#endif // WEBKIT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ +#endif // CONTENT_BROWSER_QUOTA_MOCK_SPECIAL_STORAGE_POLICY_H_ diff --git a/content/public/test/sandbox_file_system_test_helper.cc b/content/public/test/sandbox_file_system_test_helper.cc index 621ee221..96c47ce 100644 --- a/content/public/test/sandbox_file_system_test_helper.cc +++ b/content/public/test/sandbox_file_system_test_helper.cc @@ -7,6 +7,7 @@ #include "base/file_util.h" #include "base/message_loop/message_loop_proxy.h" #include "base/run_loop.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_file_system_context.h" #include "url/gurl.h" #include "webkit/browser/fileapi/file_system_context.h" @@ -16,7 +17,6 @@ #include "webkit/browser/fileapi/file_system_url.h" #include "webkit/browser/fileapi/file_system_usage_cache.h" #include "webkit/browser/fileapi/sandbox_file_system_backend.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" #include "webkit/browser/quota/quota_manager_proxy.h" #include "webkit/common/fileapi/file_system_util.h" diff --git a/content/public/test/test_file_system_context.cc b/content/public/test/test_file_system_context.cc index aa954de..f577af4 100644 --- a/content/public/test/test_file_system_context.cc +++ b/content/public/test/test_file_system_context.cc @@ -5,12 +5,12 @@ #include "content/public/test/test_file_system_context.h" #include "base/memory/scoped_vector.h" +#include "content/public/test/mock_special_storage_policy.h" #include "content/public/test/test_file_system_backend.h" #include "content/public/test/test_file_system_options.h" #include "webkit/browser/fileapi/external_mount_points.h" #include "webkit/browser/fileapi/file_system_backend.h" #include "webkit/browser/fileapi/file_system_context.h" -#include "webkit/browser/quota/mock_special_storage_policy.h" namespace content { @@ -33,7 +33,7 @@ CreateFileSystemContextWithAdditionalProvidersForTesting( base::MessageLoopProxy::current().get(), base::MessageLoopProxy::current().get(), fileapi::ExternalMountPoints::CreateRefCounted().get(), - make_scoped_refptr(new quota::MockSpecialStoragePolicy()).get(), + make_scoped_refptr(new MockSpecialStoragePolicy()).get(), quota_manager_proxy, additional_providers.Pass(), std::vector<fileapi::URLRequestAutoMountHandler>(), @@ -51,7 +51,7 @@ CreateFileSystemContextWithAutoMountersForTesting( base::MessageLoopProxy::current().get(), base::MessageLoopProxy::current().get(), fileapi::ExternalMountPoints::CreateRefCounted().get(), - make_scoped_refptr(new quota::MockSpecialStoragePolicy()).get(), + make_scoped_refptr(new MockSpecialStoragePolicy()).get(), quota_manager_proxy, additional_providers.Pass(), auto_mounters, @@ -67,7 +67,7 @@ fileapi::FileSystemContext* CreateIncognitoFileSystemContextForTesting( base::MessageLoopProxy::current().get(), base::MessageLoopProxy::current().get(), fileapi::ExternalMountPoints::CreateRefCounted().get(), - make_scoped_refptr(new quota::MockSpecialStoragePolicy()).get(), + make_scoped_refptr(new MockSpecialStoragePolicy()).get(), quota_manager_proxy, additional_providers.Pass(), std::vector<fileapi::URLRequestAutoMountHandler>(), diff --git a/webkit/browser/database/database_tracker.h b/webkit/browser/database/database_tracker.h index 8223d1c..25d4986 100644 --- a/webkit/browser/database/database_tracker.h +++ b/webkit/browser/database/database_tracker.h @@ -26,6 +26,10 @@ namespace base { class MessageLoopProxy; } +namespace content { +class DatabaseTracker_TestHelper_Test; +} + namespace sql { class Connection; class MetaTable; @@ -179,7 +183,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DatabaseTracker private: friend class base::RefCountedThreadSafe<DatabaseTracker>; - friend class MockDatabaseTracker; // for testing + friend class content::DatabaseTracker_TestHelper_Test; + friend class MockDatabaseTracker; // for testing typedef std::map<std::string, std::set<base::string16> > DatabaseSet; typedef std::vector<std::pair<net::CompletionCallback, DatabaseSet> > |