summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcaitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-05 18:41:22 +0000
committercaitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-05 18:41:22 +0000
commitc8e56bd49ed2a92cc51164aa2f06c5d7e1ed0a60 (patch)
treec6d621de3b1164c0752d76e7cc4f8b1c39c55bd4
parentb1babd99ec7a05a76f0b93f6fa17519b661a07b5 (diff)
downloadchromium_src-c8e56bd49ed2a92cc51164aa2f06c5d7e1ed0a60.zip
chromium_src-c8e56bd49ed2a92cc51164aa2f06c5d7e1ed0a60.tar.gz
chromium_src-c8e56bd49ed2a92cc51164aa2f06c5d7e1ed0a60.tar.bz2
Move WebData component unittests to //components/webdata.
TBR=ben@chromium.org BUG=181277 Review URL: https://chromiumcodereview.appspot.com/13650007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192608 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_autofill_unittest.cc2
-rw-r--r--chrome/chrome_tests_unit.gypi15
-rw-r--r--components/autofill/browser/autocomplete_history_manager_unittest.cc2
-rw-r--r--components/webdata/DEPS22
-rw-r--r--components/webdata/autofill/autofill_entry_unittest.cc (renamed from chrome/browser/webdata/autofill_entry_unittest.cc)0
-rw-r--r--components/webdata/autofill/autofill_table_unittest.cc (renamed from chrome/browser/webdata/autofill_table_unittest.cc)0
-rw-r--r--components/webdata/autofill/web_data_service_unittest.cc (renamed from chrome/browser/webdata/web_data_service_unittest.cc)2
-rw-r--r--components/webdata/autofill/web_database_migration_unittest.cc (renamed from chrome/browser/webdata/web_database_migration_unittest.cc)0
-rw-r--r--components/webdata/common/web_data_service_test_util.cc (renamed from chrome/browser/webdata/web_data_service_test_util.cc)2
-rw-r--r--components/webdata/common/web_data_service_test_util.h (renamed from chrome/browser/webdata/web_data_service_test_util.h)6
11 files changed, 35 insertions, 18 deletions
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
index 5a72096..3cb8284 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
@@ -17,10 +17,10 @@
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "chrome/browser/webdata/autocomplete_syncable_service.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
-#include "chrome/browser/webdata/web_data_service_test_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/profile_mock.h"
#include "components/webdata/autofill/autofill_webdata_service.h"
+#include "components/webdata/common/web_data_service_test_util.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index e6215d1..8b0b4a9 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -38,13 +38,13 @@
#include "chrome/browser/webdata/autocomplete_syncable_service.h"
#include "chrome/browser/webdata/autofill_profile_syncable_service.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
-#include "chrome/browser/webdata/web_data_service_test_util.h"
#include "components/autofill/browser/autofill_common_test.h"
#include "components/autofill/browser/personal_data_manager.h"
#include "components/webdata/autofill/autofill_change.h"
#include "components/webdata/autofill/autofill_entry.h"
#include "components/webdata/autofill/autofill_table.h"
#include "components/webdata/autofill/autofill_webdata_service.h"
+#include "components/webdata/common/web_data_service_test_util.h"
#include "components/webdata/common/web_database.h"
#include "content/public/test/test_browser_thread.h"
#include "google_apis/gaia/gaia_constants.h"
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 2cffd57..346035f4 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -1477,16 +1477,10 @@
'browser/web_applications/web_app_unittest.cc',
'browser/web_resource/promo_resource_service_mobile_ntp_unittest.cc',
'browser/web_resource/promo_resource_service_unittest.cc',
- 'browser/webdata/autofill_entry_unittest.cc',
'browser/webdata/autofill_profile_syncable_service_unittest.cc',
- 'browser/webdata/autofill_table_unittest.cc',
'browser/webdata/keyword_table_unittest.cc',
'browser/webdata/token_service_table_unittest.cc',
'browser/webdata/web_apps_table_unittest.cc',
- 'browser/webdata/web_data_service_test_util.cc',
- 'browser/webdata/web_data_service_test_util.h',
- 'browser/webdata/web_data_service_unittest.cc',
- 'browser/webdata/web_database_migration_unittest.cc',
'common/bzip2_unittest.cc',
'common/cancelable_task_tracker_unittest.cc',
'common/child_process_logging_mac_unittest.mm',
@@ -1685,6 +1679,15 @@
'../components/autofill/browser/wallet/wallet_test_util.cc',
'../components/autofill/browser/wallet/wallet_test_util.h',
+ # TODO(caitkp): Move to //components/components.gypi once
+ # remaining dependencies back to //chrome are eliminated.
+ '../components/webdata/autofill/autofill_entry_unittest.cc',
+ '../components/webdata/autofill/autofill_table_unittest.cc',
+ '../components/webdata/autofill/web_data_service_unittest.cc',
+ '../components/webdata/autofill/web_database_migration_unittest.cc',
+ '../components/webdata/common/web_data_service_test_util.cc',
+ '../components/webdata/common/web_data_service_test_util.h',
+
# TODO(joi): Move the google_apis tests to a separate
# google_apis_unittests executable.
'../google_apis/google_api_keys_unittest.cc',
diff --git a/components/autofill/browser/autocomplete_history_manager_unittest.cc b/components/autofill/browser/autocomplete_history_manager_unittest.cc
index 5d1e2a2..fcee54d 100644
--- a/components/autofill/browser/autocomplete_history_manager_unittest.cc
+++ b/components/autofill/browser/autocomplete_history_manager_unittest.cc
@@ -9,7 +9,6 @@
#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
-#include "chrome/browser/webdata/web_data_service_test_util.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
@@ -19,6 +18,7 @@
#include "components/autofill/browser/test_autofill_manager_delegate.h"
#include "components/autofill/common/form_data.h"
#include "components/webdata/autofill/autofill_webdata_service.h"
+#include "components/webdata/common/web_data_service_test_util.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/components/webdata/DEPS b/components/webdata/DEPS
index c9730aa..6ccecd5 100644
--- a/components/webdata/DEPS
+++ b/components/webdata/DEPS
@@ -1,10 +1,24 @@
include_rules = [
- # Webdata is being made into a component (it will end up at
- # //components/webdata and not depend on //chrome), so we have these basic
- # rules followed by temporary exceptions. Please don't add to the list of
- # exceptions!
"+components/encryptor",
"+content/public/browser",
"+sql",
"+ui",
]
+
+specific_include_rules = {
+ # TODO(caitkp): Extract unit tests from //chrome, at lower priority
+ # than production code.
+ r'(.*_unittest|.*_test_util)\.(cc|h)': [
+ "+chrome/browser/webdata/keyword_table.h",
+ "+chrome/browser/webdata/logins_table.h",
+ "+chrome/browser/webdata/token_service_table.h",
+ "+chrome/browser/webdata/web_apps_table.h",
+ "+chrome/browser/webdata/web_data_service.h",
+ "+chrome/browser/webdata/web_data_service_factory.h",
+ "+chrome/browser/webdata/web_intents_table.h",
+ "+chrome/test/base/ui_test_utils.h",
+ "+content/public/test",
+ "+testing/gmock/include/gmock/gmock.h",
+ "+testing/gtest/include/gtest/gtest.h",
+ ],
+}
diff --git a/chrome/browser/webdata/autofill_entry_unittest.cc b/components/webdata/autofill/autofill_entry_unittest.cc
index 481877b..481877b 100644
--- a/chrome/browser/webdata/autofill_entry_unittest.cc
+++ b/components/webdata/autofill/autofill_entry_unittest.cc
diff --git a/chrome/browser/webdata/autofill_table_unittest.cc b/components/webdata/autofill/autofill_table_unittest.cc
index 6ce6d57..6ce6d57 100644
--- a/chrome/browser/webdata/autofill_table_unittest.cc
+++ b/components/webdata/autofill/autofill_table_unittest.cc
diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/components/webdata/autofill/web_data_service_unittest.cc
index 4b73547..b7124ac 100644
--- a/chrome/browser/webdata/web_data_service_unittest.cc
+++ b/components/webdata/autofill/web_data_service_unittest.cc
@@ -17,7 +17,6 @@
#include "base/synchronization/waitable_event.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/webdata/web_data_service_test_util.h"
#include "components/autofill/browser/autofill_country.h"
#include "components/autofill/browser/autofill_profile.h"
#include "components/autofill/browser/credit_card.h"
@@ -27,6 +26,7 @@
#include "components/webdata/autofill/autofill_table.h"
#include "components/webdata/autofill/autofill_webdata_service.h"
#include "components/webdata/autofill/autofill_webdata_service_observer.h"
+#include "components/webdata/common/web_data_service_test_util.h"
#include "components/webdata/common/web_database_service.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/webdata/web_database_migration_unittest.cc b/components/webdata/autofill/web_database_migration_unittest.cc
index 8a715a5..8a715a5 100644
--- a/chrome/browser/webdata/web_database_migration_unittest.cc
+++ b/components/webdata/autofill/web_database_migration_unittest.cc
diff --git a/chrome/browser/webdata/web_data_service_test_util.cc b/components/webdata/common/web_data_service_test_util.cc
index 706ef3b..13cc591 100644
--- a/chrome/browser/webdata/web_data_service_test_util.cc
+++ b/components/webdata/common/web_data_service_test_util.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/webdata/web_data_service_test_util.h"
+#include "components/webdata/common/web_data_service_test_util.h"
#include "components/webdata/autofill/autofill_webdata_service.h"
diff --git a/chrome/browser/webdata/web_data_service_test_util.h b/components/webdata/common/web_data_service_test_util.h
index 4bd72ef..e037a15 100644
--- a/chrome/browser/webdata/web_data_service_test_util.h
+++ b/components/webdata/common/web_data_service_test_util.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_TEST_UTIL_H__
-#define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_TEST_UTIL_H__
+#ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__
+#define COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__
#include "base/basictypes.h"
#include "base/message_loop.h"
@@ -73,4 +73,4 @@ class MockWebDataServiceWrapper : public MockWebDataServiceWrapperBase {
DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapper);
};
-#endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_TEST_UTIL_H__
+#endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__