0

Move remaining database unit tests from webkit/ to content/

BUG=338338

Review URL: https://codereview.chromium.org/281383003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271847 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
pilgrim@chromium.org
2014-05-21 03:37:40 +00:00
parent 2a649ded13
commit 8ca5150af6
5 changed files with 20 additions and 13 deletions

@ -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.
@ -17,7 +17,11 @@
#include "webkit/browser/database/database_util.h"
#include "webkit/common/database/database_identifier.h"
namespace webkit_database {
using webkit_database::DatabaseQuotaClient;
using webkit_database::DatabaseTracker;
using webkit_database::OriginInfo;
namespace content {
// Declared to shorten the line lengths.
static const quota::StorageType kTemp = quota::kStorageTypeTemporary;
@ -282,4 +286,4 @@ TEST_F(DatabaseQuotaClientTest, DeleteOriginData) {
EXPECT_EQ(2, mock_tracker()->delete_called_count());
}
} // namespace webkit_database
} // namespace content

@ -1,4 +1,4 @@
// Copyright (c) 2011 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.
@ -40,7 +40,7 @@ static void TestValidOriginIdentifier(bool expected_result,
DatabaseUtil::IsValidOriginIdentifier(id));
}
namespace webkit_database {
namespace content {
// Test DatabaseUtil::CrackVfsFilePath on various inputs.
TEST(DatabaseUtilTest, CrackVfsFilePathTest) {
@ -72,4 +72,4 @@ TEST(DatabaseUtilTest, IsValidOriginIdentifier) {
TestValidOriginIdentifier(false, std::string("bad\0id", 6));
}
} // namespace webkit_database
} // namespace content

@ -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.
@ -13,8 +13,10 @@
#include "webkit/browser/database/databases_table.h"
using base::ASCIIToUTF16;
using webkit_database::DatabaseDetails;
using webkit_database::DatabasesTable;
namespace webkit_database {
namespace content {
static void CheckDetailsAreEqual(const DatabaseDetails& d1,
const DatabaseDetails& d2) {
@ -147,4 +149,4 @@ TEST(DatabasesTableTest, TestIt) {
ASSERT_TRUE(ignore_errors.CheckIgnoredErrors());
}
} // namespace webkit_database
} // namespace content

@ -405,7 +405,10 @@
'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/databases_table_unittest.cc',
'browser/database_quota_client_unittest.cc',
'browser/database_tracker_unittest.cc',
'browser/database_util_unittest.cc',
'browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc',
'browser/device_sensors/sensor_manager_android_unittest.cc',
'browser/devtools/embedded_worker_devtools_manager_unittest.cc',
@ -691,9 +694,6 @@
'test/image_decoder_test.h',
'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_util_unittest.cc',
'../webkit/browser/database/databases_table_unittest.cc',
'../webkit/child/multipart_response_delegate_unittest.cc',
],
'conditions': [

@ -28,6 +28,7 @@ class MessageLoopProxy;
namespace content {
class DatabaseTracker_TestHelper_Test;
class MockDatabaseTracker;
}
namespace sql {
@ -184,7 +185,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT DatabaseTracker
private:
friend class base::RefCountedThreadSafe<DatabaseTracker>;
friend class content::DatabaseTracker_TestHelper_Test;
friend class MockDatabaseTracker; // for testing
friend class content::MockDatabaseTracker; // for testing
typedef std::map<std::string, std::set<base::string16> > DatabaseSet;
typedef std::vector<std::pair<net::CompletionCallback, DatabaseSet> >