summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2014-11-25 12:30:10 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-25 20:30:39 +0000
commit81d760e7ce27957a41f4685a37c1d0c3d7c6e5e8 (patch)
tree38ce6c3a4f63bc3d56e9d04b5a2c66913b74d65d
parentea1593d0862064d4ee3818abac68dc84579e346e (diff)
downloadchromium_src-81d760e7ce27957a41f4685a37c1d0c3d7c6e5e8.zip
chromium_src-81d760e7ce27957a41f4685a37c1d0c3d7c6e5e8.tar.gz
chromium_src-81d760e7ce27957a41f4685a37c1d0c3d7c6e5e8.tar.bz2
Add more components unit tests to GN build.
This adds a lot of missing dependencies. Some of these are required to link, most of the rest are a result of running "gn check" over the affected directories. Review URL: https://codereview.chromium.org/746783002 Cr-Commit-Position: refs/heads/master@{#305687}
-rw-r--r--base/BUILD.gn4
-rw-r--r--components/BUILD.gn17
-rw-r--r--components/autofill.gypi16
-rw-r--r--components/autofill/content/browser/BUILD.gn16
-rw-r--r--components/autofill/content/common/BUILD.gn1
-rw-r--r--components/autofill/content/renderer/BUILD.gn3
-rw-r--r--components/autofill/core/browser/BUILD.gn22
-rw-r--r--components/autofill/core/common/BUILD.gn4
-rw-r--r--components/content_settings.gypi4
-rw-r--r--components/content_settings/core/browser/BUILD.gn7
-rw-r--r--components/content_settings/core/common/BUILD.gn2
-rw-r--r--components/google/core/browser/BUILD.gn21
-rw-r--r--components/infobars.gypi1
-rw-r--r--components/infobars/core/BUILD.gn1
-rw-r--r--components/infobars/test/BUILD.gn5
-rw-r--r--components/omnibox.gypi2
-rw-r--r--components/omnibox/BUILD.gn3
-rw-r--r--components/search_engines.gypi1
-rw-r--r--components/search_engines/BUILD.gn1
-rw-r--r--components/variations.gypi5
-rw-r--r--components/variations/BUILD.gn2
-rw-r--r--components/variations/net/BUILD.gn7
-rw-r--r--components/web_resource/BUILD.gn3
23 files changed, 132 insertions, 16 deletions
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 2cce16c..a37b32d 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1087,9 +1087,11 @@ source_set("prefs_test_support") {
"prefs/testing_pref_store.h",
]
+ public_deps = [
+ ":prefs",
+ ]
deps = [
":base",
- ":prefs",
"//testing/gmock",
"//testing/gtest",
]
diff --git a/components/BUILD.gn b/components/BUILD.gn
index eaa056e..ac90354 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -221,9 +221,9 @@ test("components_unittests") {
"//components/auto_login_parser:unit_tests",
# TODO(GYP) enable the rest of these. Some will likely work, but some
# require extra dependencies to link properly.
- #"//components/autofill/content/browser:unit_tests",
- #"//components/autofill/core/browser:unit_tests",
- #"//components/autofill/core/common:unit_tests",
+ "//components/autofill/content/browser:unit_tests",
+ "//components/autofill/core/browser:unit_tests",
+ "//components/autofill/core/common:unit_tests",
#"//components/bookmarks/browser:unit_tests",
#"//components/captive_portal:unit_tests",
#"//components/cloud_devices/common:unit_tests",
@@ -235,13 +235,14 @@ test("components_unittests") {
#"//components/data_reduction_proxy/core/common:unit_tests",
#"//components/dom_distiller/core:unit_tests",
#"//components/domain_reliability:unit_tests",
+ "//components/google/core/browser:unit_tests",
#"//components/login:unit_tests",
#"//components/metrics:unit_tests",
- #"//components/omnibox:unit_tests",
- #"//components/ownership:unit_tests",
- #"//components/proximity_auth:unit_tests",
- #"//components/variations:unit_tests",
- #"//components/web_resource:unit_tests",
+ "//components/omnibox:unit_tests",
+ "//components/ownership:unit_tests",
+ "//components/proximity_auth:unit_tests",
+ "//components/variations:unit_tests",
+ "//components/web_resource:unit_tests",
# These are the deps required by the code in this target.
"//base",
diff --git a/components/autofill.gypi b/components/autofill.gypi
index 359ad36..c67abc5 100644
--- a/components/autofill.gypi
+++ b/components/autofill.gypi
@@ -30,6 +30,7 @@
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
+ '../base/base.gyp:base_i18n',
'../ui/base/ui_base.gyp:ui_base',
'../ui/gfx/gfx.gyp:gfx',
'../url/url.gyp:url_lib',
@@ -79,6 +80,7 @@
'../base/base.gyp:base_i18n',
'../base/base.gyp:base_prefs',
'../google_apis/google_apis.gyp:google_apis',
+ '../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../sql/sql.gyp:sql',
'../third_party/fips181/fips181.gyp:fips181',
@@ -236,10 +238,15 @@
'target_name': 'autofill_core_test_support',
'type': 'static_library',
'dependencies': [
- 'autofill_core_common',
- 'autofill_core_browser',
+ '../base/base.gyp:base',
+ '../base/base.gyp:base_prefs',
+ '../base/base.gyp:test_support_base',
'../skia/skia.gyp:skia',
'../testing/gtest.gyp:gtest',
+ 'autofill_core_common',
+ 'autofill_core_browser',
+ 'os_crypt',
+ 'pref_registry',
],
'sources': [
'autofill/core/browser/autofill_test_utils.cc',
@@ -272,6 +279,7 @@
'../third_party/WebKit/public/blink.gyp:blink_minimal',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
+ '../url/url.gyp:url_lib',
],
'include_dirs': [
'..',
@@ -328,6 +336,7 @@
'../content/content.gyp:content_common',
'../google_apis/google_apis.gyp:google_apis',
'../ipc/ipc.gyp:ipc',
+ '../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../sql/sql.gyp:sql',
'../third_party/icu/icu.gyp:icui18n',
@@ -403,9 +412,12 @@
'../base/base.gyp:base',
'../content/content.gyp:content_common',
'../content/content.gyp:content_renderer',
+ '../google_apis/google_apis.gyp:google_apis',
'../ipc/ipc.gyp:ipc',
+ '../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../third_party/WebKit/public/blink.gyp:blink',
+ '../ui/base/ui_base.gyp:ui_base',
'autofill_content_common',
'autofill_core_common',
'components_strings.gyp:components_strings',
diff --git a/components/autofill/content/browser/BUILD.gn b/components/autofill/content/browser/BUILD.gn
index def5a45..9cdcf68 100644
--- a/components/autofill/content/browser/BUILD.gn
+++ b/components/autofill/content/browser/BUILD.gn
@@ -56,7 +56,9 @@ static_library("browser") {
"//content/public/browser",
"//content/public/common",
"//google_apis",
+ "//gpu/config",
"//ipc",
+ "//net",
"//sql",
"//third_party/icu",
"//third_party/libphonenumber",
@@ -85,6 +87,8 @@ static_library("test_support") {
]
deps = [
+ ":browser",
+ "//base",
"//testing/gmock",
]
}
@@ -106,6 +110,18 @@ source_set("unit_tests") {
deps = [
":browser",
":test_support",
+ "//base",
+ "//components/autofill/content/common",
+ "//components/autofill/core/browser",
+ "//components/autofill/core/browser:test_support",
+ "//components/autofill/core/common",
+ "//content/public/browser",
+ "//content/public/common",
+ "//content/test:test_support",
+ "//google_apis",
+ "//ipc:test_support",
+ "//net",
+ "//net:test_support",
"//testing/gmock",
"//testing/gtest",
]
diff --git a/components/autofill/content/common/BUILD.gn b/components/autofill/content/common/BUILD.gn
index 733dfa7..e7cd81f 100644
--- a/components/autofill/content/common/BUILD.gn
+++ b/components/autofill/content/common/BUILD.gn
@@ -19,5 +19,6 @@ static_library("common") {
"//third_party/WebKit/public:blink_minimal",
"//ui/gfx",
"//ui/gfx/ipc",
+ "//url",
]
}
diff --git a/components/autofill/content/renderer/BUILD.gn b/components/autofill/content/renderer/BUILD.gn
index 29ec170..89706ab 100644
--- a/components/autofill/content/renderer/BUILD.gn
+++ b/components/autofill/content/renderer/BUILD.gn
@@ -30,9 +30,12 @@ static_library("renderer") {
"//components/strings",
"//content/public/common",
"//content/public/renderer",
+ "//google_apis",
"//ipc",
+ "//net",
"//skia",
"//third_party/WebKit/public:blink",
+ "//ui/base",
]
if (is_win) {
diff --git a/components/autofill/core/browser/BUILD.gn b/components/autofill/core/browser/BUILD.gn
index b31e90f..eac8145 100644
--- a/components/autofill/core/browser/BUILD.gn
+++ b/components/autofill/core/browser/BUILD.gn
@@ -143,6 +143,7 @@ static_library("browser") {
"//components/strings",
"//components/webdata/common",
"//google_apis",
+ "//net",
"//skia",
"//sql",
"//third_party/fips181",
@@ -192,8 +193,14 @@ static_library("test_support") {
deps = [
":browser",
+ "//base",
+ "//base:prefs",
+ "//base:prefs_test_support",
+ "//base/test:test_support",
"//components/autofill/core/browser",
"//components/autofill/core/common",
+ "//components/os_crypt",
+ "//components/pref_registry",
"//skia",
"//testing/gtest",
]
@@ -238,10 +245,23 @@ source_set("unit_tests") {
deps = [
":browser",
":test_support",
+ "//base",
+ "//base:prefs",
+ "//base/test:test_support",
+ "//components/autofill/core/common",
+ "//components/os_crypt",
"//components/resources",
"//components/strings",
+ "//components/webdata/common",
+ "//net:test_support",
+ "//sql",
+ "//sync",
+ "//sync:test_support_sync_api",
"//testing/gmock",
+ "//testing/gtest",
"//third_party/libphonenumber",
- "//third_party/libjingle"
+ "//third_party/libjingle",
+ "//ui/base",
+ "//url",
]
}
diff --git a/components/autofill/core/common/BUILD.gn b/components/autofill/core/common/BUILD.gn
index b9c1b1d..e2f7e68 100644
--- a/components/autofill/core/common/BUILD.gn
+++ b/components/autofill/core/common/BUILD.gn
@@ -34,6 +34,7 @@ static_library("common") {
deps = [
"//base",
+ "//base:i18n",
"//ui/base",
"//ui/gfx",
"//url",
@@ -55,7 +56,10 @@ source_set("unit_tests") {
deps = [
":common",
+ "//base",
+ "//base:i18n",
"//testing/gmock",
"//testing/gtest",
+ "//url",
]
}
diff --git a/components/content_settings.gypi b/components/content_settings.gypi
index 6a66bf6..cb5b77d 100644
--- a/components/content_settings.gypi
+++ b/components/content_settings.gypi
@@ -10,7 +10,11 @@
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
+ '../base/base.gyp:base_prefs',
+ '../net/net.gyp:net',
+ '../url/url.gyp:url_lib',
'content_settings_core_common',
+ 'pref_registry',
],
'variables': { 'enable_wexit_time_destructors': 1, },
'include_dirs': [
diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn
index 4a1e2da..8b1841c 100644
--- a/components/content_settings/core/browser/BUILD.gn
+++ b/components/content_settings/core/browser/BUILD.gn
@@ -32,7 +32,11 @@ static_library("browser") {
deps = [
"//base",
+ "//base:prefs",
"//components/content_settings/core/common",
+ "//components/pref_registry:pref_registry",
+ "//net",
+ "//url",
]
}
@@ -48,8 +52,11 @@ source_set("unit_tests") {
deps = [
":browser",
+ "//base",
+ "//components/content_settings/core/common",
"//components/content_settings/core/test:test_support",
"//testing/gtest",
+ "//url",
]
}
diff --git a/components/content_settings/core/common/BUILD.gn b/components/content_settings/core/common/BUILD.gn
index 6e39d74..f76ef9c 100644
--- a/components/content_settings/core/common/BUILD.gn
+++ b/components/content_settings/core/common/BUILD.gn
@@ -33,7 +33,9 @@ source_set("unit_tests") {
deps = [
":common",
+ "//net",
"//testing/gmock",
"//testing/gtest",
+ "//url",
]
}
diff --git a/components/google/core/browser/BUILD.gn b/components/google/core/browser/BUILD.gn
index 67c137e..251183b 100644
--- a/components/google/core/browser/BUILD.gn
+++ b/components/google/core/browser/BUILD.gn
@@ -31,6 +31,7 @@ static_library("browser") {
deps = [
"//base",
+ "//base:prefs",
"//components/keyed_service/core",
"//components/infobars/core",
"//components/strings",
@@ -40,3 +41,23 @@ static_library("browser") {
"//url",
]
}
+
+source_set("unit_tests") {
+ testonly = true
+
+ sources = [
+ "google_url_tracker_unittest.cc",
+ "google_util_unittest.cc"
+ ]
+
+ deps = [
+ ":browser",
+ "//base",
+ "//base:prefs",
+ "//base:prefs_test_support",
+ "//components/infobars/core",
+ "//components/infobars/test:test_support",
+ "//net:test_support",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/infobars.gypi b/components/infobars.gypi
index 6a9692e..172a7b6 100644
--- a/components/infobars.gypi
+++ b/components/infobars.gypi
@@ -14,6 +14,7 @@
'dependencies': [
'../base/base.gyp:base',
'../skia/skia.gyp:skia',
+ '../ui/base/ui_base.gyp:ui_base',
'../ui/gfx/gfx.gyp:gfx',
'../ui/strings/ui_strings.gyp:ui_strings',
],
diff --git a/components/infobars/core/BUILD.gn b/components/infobars/core/BUILD.gn
index 44330ce..13499c4 100644
--- a/components/infobars/core/BUILD.gn
+++ b/components/infobars/core/BUILD.gn
@@ -24,6 +24,7 @@ static_library("core") {
]
deps = [
"//base",
+ "//ui/base",
"//ui/gfx",
"//ui/strings",
]
diff --git a/components/infobars/test/BUILD.gn b/components/infobars/test/BUILD.gn
index 606cecd..637738f 100644
--- a/components/infobars/test/BUILD.gn
+++ b/components/infobars/test/BUILD.gn
@@ -2,13 +2,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("test_support") {
+source_set("test_support") {
+ testonly = true
+
sources = [
"infobar_test.cc",
]
deps = [
"//base",
+ "//components/infobars/core",
"//skia",
]
}
diff --git a/components/omnibox.gypi b/components/omnibox.gypi
index 05029de..a2a89d1 100644
--- a/components/omnibox.gypi
+++ b/components/omnibox.gypi
@@ -10,12 +10,14 @@
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
+ '../base/base.gyp:base_i18n',
'../net/net.gyp:net',
'../ui/base/ui_base.gyp:ui_base',
'../url/url.gyp:url_lib',
'component_metrics_proto',
'components_resources.gyp:components_resources',
'components_strings.gyp:components_strings',
+ 'history_core_browser',
'search',
'search_engines',
'url_fixer',
diff --git a/components/omnibox/BUILD.gn b/components/omnibox/BUILD.gn
index 2dcd7bf..f3f4d9e 100644
--- a/components/omnibox/BUILD.gn
+++ b/components/omnibox/BUILD.gn
@@ -42,7 +42,10 @@ static_library("omnibox") {
]
deps = [
"//base",
+ "//base:i18n",
+ "//components/history/core/browser",
"//components/resources",
+ "//components/search",
"//components/search_engines",
"//components/strings",
"//components/url_fixer",
diff --git a/components/search_engines.gypi b/components/search_engines.gypi
index 3006ac34..3a5eb48 100644
--- a/components/search_engines.gypi
+++ b/components/search_engines.gypi
@@ -20,6 +20,7 @@
'component_metrics_proto',
'components_strings.gyp:components_strings',
'google_core_browser',
+ 'history_core_browser',
'keyed_service_core',
'policy',
'pref_registry',
diff --git a/components/search_engines/BUILD.gn b/components/search_engines/BUILD.gn
index afc5be6..3eaaaeb 100644
--- a/components/search_engines/BUILD.gn
+++ b/components/search_engines/BUILD.gn
@@ -45,6 +45,7 @@ static_library("search_engines") {
":prepopulated_engines",
"//base",
"//components/google/core/browser",
+ "//components/history/core/browser",
"//components/keyed_service/core",
"//components/metrics/proto",
"//components/pref_registry",
diff --git a/components/variations.gypi b/components/variations.gypi
index 6c9a252..6459213 100644
--- a/components/variations.gypi
+++ b/components/variations.gypi
@@ -15,6 +15,7 @@
# List of dependencies is intentionally very minimal. Please avoid
# adding extra dependencies without first checking with OWNERS.
'../base/base.gyp:base',
+ '../base/base.gyp:base_prefs',
'../third_party/mt19937ar/mt19937ar.gyp:mt19937ar',
],
'sources': [
@@ -62,7 +63,7 @@
],
},
{
- # GN version: //components/variations/net/variations_http_provider
+ # GN version: //components/variations/net:net
'target_name': 'variations_http_provider',
'type': 'static_library',
'include_dirs': [
@@ -70,6 +71,8 @@
],
'dependencies': [
'../base/base.gyp:base',
+ '../net/net.gyp:net',
+ '../url/url.gyp:url_lib',
'components.gyp:google_core_browser',
"components.gyp:metrics",
'variations',
diff --git a/components/variations/BUILD.gn b/components/variations/BUILD.gn
index 5bf88ee..ed81870 100644
--- a/components/variations/BUILD.gn
+++ b/components/variations/BUILD.gn
@@ -41,6 +41,7 @@ source_set("variations") {
deps = [
"proto",
"//base",
+ "//base:prefs",
"//third_party/mt19937ar",
]
@@ -77,6 +78,7 @@ source_set("unit_tests") {
":variations",
"net",
"proto",
+ "//base:prefs_test_support",
"//base/test:test_support",
"//testing/gtest",
]
diff --git a/components/variations/net/BUILD.gn b/components/variations/net/BUILD.gn
index 34158fe..0511046 100644
--- a/components/variations/net/BUILD.gn
+++ b/components/variations/net/BUILD.gn
@@ -8,12 +8,15 @@ source_set("net") {
"variations_http_header_provider.h",
]
- public_deps = [ "//components/variations" ]
+ public_deps = [
+ "//components/variations",
+ "//net",
+ "//url",
+ ]
deps = [
"//base",
"//components/google/core/browser",
"//components/metrics",
"//components/variations/proto",
- "//net",
]
}
diff --git a/components/web_resource/BUILD.gn b/components/web_resource/BUILD.gn
index 5df17f9..f50288f 100644
--- a/components/web_resource/BUILD.gn
+++ b/components/web_resource/BUILD.gn
@@ -14,6 +14,7 @@ static_library("web_resource") {
deps = [
"//base",
+ "//base:prefs",
"//net",
]
}
@@ -26,6 +27,7 @@ static_library("test_support") {
deps = [
":web_resource",
+ "//base",
]
}
@@ -40,6 +42,7 @@ source_set("unit_tests") {
":web_resource",
":test_support",
"//base",
+ "//base:prefs_test_support",
"//testing/gtest",
]
}