summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-08-21 15:06:00 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-21 22:06:45 +0000
commit0741cb1c9b944e7a218a84870bdc177a72cb2998 (patch)
tree4dbdb50320213f29523e2695eb9561b1a4d93826
parent3306c2ace12f90742bae7c265cf4e77a2b8033d7 (diff)
downloadchromium_src-0741cb1c9b944e7a218a84870bdc177a72cb2998.zip
chromium_src-0741cb1c9b944e7a218a84870bdc177a72cb2998.tar.gz
chromium_src-0741cb1c9b944e7a218a84870bdc177a72cb2998.tar.bz2
Sync more GN unit tests with GYP.
This adds about 600 more tests. Tests added: invalidation, navigation interception, feedback, search, sync driver, enhanced bookmarks, search engines, sessions, data reduction proxy, favicon, constrained window, autofill, metrics, keyed service, bookmarks, suggestions, audio modem I renamed ui_zoom to "zoom" according to GN style. I tweaked some jingle public dependencies so the right include directories get forwarded along with the corresponding uses in the headers. Reland of http://crrev.com/1301743003 TBR=dpranke@chromium.org Review URL: https://codereview.chromium.org/1304163005 Cr-Commit-Position: refs/heads/master@{#344874}
-rw-r--r--BUILD.gn2
-rw-r--r--chrome/browser/BUILD.gn2
-rw-r--r--components/BUILD.gn20
-rw-r--r--components/audio_modem/BUILD.gn30
-rw-r--r--components/autofill/core/browser/BUILD.gn1
-rw-r--r--components/bookmarks/browser/BUILD.gn4
-rw-r--r--components/components_tests.gyp1
-rw-r--r--components/constrained_window/BUILD.gn3
-rw-r--r--components/data_reduction_proxy/core/browser/BUILD.gn3
-rw-r--r--components/enhanced_bookmarks/BUILD.gn16
-rw-r--r--components/favicon/content/BUILD.gn18
-rw-r--r--components/favicon/core/BUILD.gn2
-rw-r--r--components/feedback/BUILD.gn18
-rw-r--r--components/guest_view/browser/BUILD.gn5
-rw-r--r--components/invalidation/impl/BUILD.gn38
-rw-r--r--components/keyed_service/content/BUILD.gn11
-rw-r--r--components/keyed_service/core/BUILD.gn11
-rw-r--r--components/metrics/BUILD.gn5
-rw-r--r--components/navigation_interception/BUILD.gn15
-rw-r--r--components/rappor/BUILD.gn2
-rw-r--r--components/search/BUILD.gn14
-rw-r--r--components/search_engines/BUILD.gn21
-rw-r--r--components/sessions/BUILD.gn6
-rw-r--r--components/suggestions/BUILD.gn29
-rw-r--r--components/sync_driver/BUILD.gn71
-rw-r--r--components/ui/zoom/BUILD.gn2
-rw-r--r--components/ui_zoom.gypi1
-rw-r--r--components/web_modal/BUILD.gn5
-rw-r--r--extensions/browser/BUILD.gn2
-rw-r--r--jingle/BUILD.gn5
-rw-r--r--pdf/BUILD.gn2
31 files changed, 290 insertions, 75 deletions
diff --git a/BUILD.gn b/BUILD.gn
index a288521..cb1880b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -513,7 +513,7 @@ group("both_gn_and_gyp") {
# are pulled in automatically.
deps += [
"//cc/blink",
- "//components/ui/zoom:ui_zoom",
+ "//components/ui/zoom",
"//content",
"//content/test:test_support",
"//device/battery",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 6e4b32e..b59adef 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -157,7 +157,7 @@ source_set("browser") {
"//components/tracing:startup_tracing",
"//components/translate/core/browser",
"//components/translate/core/common",
- "//components/ui/zoom:ui_zoom",
+ "//components/ui/zoom",
"//components/undo",
"//components/update_client",
"//components/url_formatter",
diff --git a/components/BUILD.gn b/components/BUILD.gn
index fb2c347..301f780 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -107,7 +107,7 @@ group("all_components") {
"//components/translate/content/renderer",
"//components/translate/core/browser",
"//components/translate/core/common",
- "//components/ui/zoom:ui_zoom",
+ "//components/ui/zoom",
"//components/undo",
"//components/update_client",
"//components/upload_list",
@@ -311,6 +311,9 @@ test("components_unittests") {
"//components/devtools_http_handler:unit_tests",
"//components/dom_distiller/core:unit_tests",
"//components/domain_reliability:unit_tests",
+ "//components/enhanced_bookmarks:unit_tests",
+ "//components/favicon/content:unit_tests",
+ "//components/favicon/core:unit_tests",
"//components/favicon_base:unit_tests",
"//components/gcm_driver/crypto:unit_tests",
"//components/gcm_driver/instance_id:unit_tests",
@@ -319,7 +322,9 @@ test("components_unittests") {
"//components/history/content/browser:unit_tests",
"//components/history/core/browser:unit_tests",
"//components/history/core/common:unit_tests",
- "//components/invalidation/impl:unittests",
+ "//components/invalidation/impl:unit_tests",
+ "//components/keyed_service/content:unit_tests",
+ "//components/keyed_service/core:unit_tests",
"//components/login:unit_tests",
"//components/metrics:unit_tests",
"//components/mime_util:unit_tests",
@@ -331,7 +336,11 @@ test("components_unittests") {
"//components/password_manager/core/browser:unit_tests",
"//components/password_manager/core/common:unit_tests",
"//components/password_manager/sync/browser:unit_tests",
+ "//components/rappor:unit_tests",
+ "//components/search:unit_tests",
+ "//components/search_engines:unit_tests",
"//components/signin/core/browser:unit_tests",
+ "//components/suggestions:unit_tests",
"//components/sync_driver:unit_tests",
"//components/undo:unit_tests",
"//components/url_formatter:unit_tests",
@@ -379,8 +388,11 @@ test("components_unittests") {
if (!is_android && !is_ios) {
deps += [
+ "//components/audio_modem:unit_tests",
"//components/copresence:unit_tests",
+ "//components/feedback:unit_tests",
"//components/proximity_auth:unit_tests",
+ "//components/sessions:unit_tests",
]
}
@@ -402,7 +414,8 @@ test("components_unittests") {
}
if (toolkit_views) {
- # TODO(GYP) enable this as above.
+ # TODO bug 522654 Enable this when the undefined symbol is fixed in
+ # web_modal such that this links.
#deps += [ "//components/constrained_window:unit_tests" ]
}
if (is_win) {
@@ -414,6 +427,7 @@ test("components_unittests") {
}
if (!is_ios) {
deps += [
+ "//components/navigation_interception:unit_tests",
"//components/safe_json:unit_tests",
"//components/scheduler:unit_tests",
]
diff --git a/components/audio_modem/BUILD.gn b/components/audio_modem/BUILD.gn
index 32f3963..bb4b4b0 100644
--- a/components/audio_modem/BUILD.gn
+++ b/components/audio_modem/BUILD.gn
@@ -2,7 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("audio_modem") {
+source_set("audio_modem") {
+ public = [
+ "public/audio_modem_types.h",
+ "public/modem.h",
+ "public/whispernet_client.h",
+ ]
sources = [
"audio_modem_switches.cc",
"audio_modem_switches.h",
@@ -15,9 +20,6 @@ static_library("audio_modem") {
"constants.cc",
"modem_impl.cc",
"modem_impl.h",
- "public/audio_modem_types.h",
- "public/modem.h",
- "public/whispernet_client.h",
]
deps = [
@@ -30,6 +32,7 @@ static_library("audio_modem") {
}
source_set("test_support") {
+ testonly = true
sources = [
"test/random_samples.cc",
"test/random_samples.h",
@@ -39,8 +42,27 @@ source_set("test_support") {
"test/stub_whispernet_client.h",
]
+ public_deps = [
+ ":audio_modem",
+ ]
deps = [
"//base",
"//media",
]
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "audio_player_unittest.cc",
+ "audio_recorder_unittest.cc",
+ "modem_unittest.cc",
+ ]
+
+ configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+
+ deps = [
+ ":test_support",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/autofill/core/browser/BUILD.gn b/components/autofill/core/browser/BUILD.gn
index c5b0b4ac..06ae546 100644
--- a/components/autofill/core/browser/BUILD.gn
+++ b/components/autofill/core/browser/BUILD.gn
@@ -251,6 +251,7 @@ source_set("unit_tests") {
"phone_field_unittest.cc",
"phone_number_i18n_unittest.cc",
"phone_number_unittest.cc",
+ "ui/card_unmask_prompt_controller_impl_unittest.cc",
"validation_unittest.cc",
"webdata/autofill_profile_syncable_service_unittest.cc",
"webdata/autofill_table_unittest.cc",
diff --git a/components/bookmarks/browser/BUILD.gn b/components/bookmarks/browser/BUILD.gn
index 03aaee9..5c9ca4e 100644
--- a/components/bookmarks/browser/BUILD.gn
+++ b/components/bookmarks/browser/BUILD.gn
@@ -74,6 +74,10 @@ source_set("unit_tests") {
"bookmark_utils_unittest.cc",
]
+ if (toolkit_views) {
+ sources += [ "bookmark_node_data_unittest.cc" ]
+ }
+
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 462598f..c18d832 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -185,7 +185,6 @@
'undo/undo_manager_test.cc',
],
- # Note: GN tests converted to here, need to do the rest.
'audio_modem_unittest_sources': [
'audio_modem/audio_player_unittest.cc',
'audio_modem/audio_recorder_unittest.cc',
diff --git a/components/constrained_window/BUILD.gn b/components/constrained_window/BUILD.gn
index 7b28498..01257f8d 100644
--- a/components/constrained_window/BUILD.gn
+++ b/components/constrained_window/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("constrained_window") {
+source_set("constrained_window") {
sources = [
"constrained_window_views.cc",
"constrained_window_views.h",
@@ -25,6 +25,7 @@ source_set("unit_tests") {
deps = [
":constrained_window",
+ "//components/web_modal:test_support",
"//ui/views:test_support",
]
}
diff --git a/components/data_reduction_proxy/core/browser/BUILD.gn b/components/data_reduction_proxy/core/browser/BUILD.gn
index a9e5758..54ae8d2 100644
--- a/components/data_reduction_proxy/core/browser/BUILD.gn
+++ b/components/data_reduction_proxy/core/browser/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("browser") {
+source_set("browser") {
sources = [
"data_reduction_proxy_bypass_protocol.cc",
"data_reduction_proxy_bypass_protocol.h",
@@ -121,6 +121,7 @@ source_set("unit_tests") {
"data_reduction_proxy_prefs_unittest.cc",
"data_reduction_proxy_request_options_unittest.cc",
"data_reduction_proxy_settings_unittest.cc",
+ "data_reduction_proxy_tamper_detection_unittest.cc",
"data_usage_store_unittest.cc",
]
diff --git a/components/enhanced_bookmarks/BUILD.gn b/components/enhanced_bookmarks/BUILD.gn
index 869a9c8..b762ae7 100644
--- a/components/enhanced_bookmarks/BUILD.gn
+++ b/components/enhanced_bookmarks/BUILD.gn
@@ -79,9 +79,23 @@ source_set("test_support") {
"test_image_store.h",
]
- deps = [
+ public_deps = [
":enhanced_bookmarks",
"//skia",
"//testing/gtest",
]
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "enhanced_bookmark_model_unittest.cc",
+ "image_store_ios_unittest.mm",
+ "image_store_unittest.cc",
+ "item_position_unittest.cc",
+ ]
+ deps = [
+ ":test_support",
+ "//components/enhanced_bookmarks/proto",
+ ]
+}
diff --git a/components/favicon/content/BUILD.gn b/components/favicon/content/BUILD.gn
index 1bea91e..fb1110b 100644
--- a/components/favicon/content/BUILD.gn
+++ b/components/favicon/content/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("content") {
+source_set("content") {
sources = [
"content_favicon_driver.cc",
"content_favicon_driver.h",
@@ -10,12 +10,26 @@ static_library("content") {
"favicon_url_util.h",
]
+ public_deps = [
+ "//ui/gfx",
+ ]
deps = [
"//base",
"//components/favicon/core",
"//components/favicon_base",
"//content/public/browser",
"//content/public/common",
- "//ui/gfx",
+ ]
+}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "content_favicon_driver_unittest.cc",
+ ]
+ deps = [
+ ":content",
+ "//content/public/browser",
+ "//testing/gtest",
]
}
diff --git a/components/favicon/core/BUILD.gn b/components/favicon/core/BUILD.gn
index 9bce6f5..0bfe6f7 100644
--- a/components/favicon/core/BUILD.gn
+++ b/components/favicon/core/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("core") {
+source_set("core") {
sources = [
"fallback_icon_client.h",
"fallback_icon_service.cc",
diff --git a/components/feedback/BUILD.gn b/components/feedback/BUILD.gn
index 4d6f40b..1669df4 100644
--- a/components/feedback/BUILD.gn
+++ b/components/feedback/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("feedback") {
+source_set("feedback") {
sources = [
"feedback_common.cc",
"feedback_common.h",
@@ -36,3 +36,19 @@ static_library("feedback") {
"//third_party/zlib:zip",
]
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "feedback_common_unittest.cc",
+ "feedback_data_unittest.cc",
+ "feedback_uploader_chrome_unittest.cc",
+ "feedback_uploader_unittest.cc",
+ ]
+ deps = [
+ ":feedback",
+ "//components/variations/net",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/guest_view/browser/BUILD.gn b/components/guest_view/browser/BUILD.gn
index 7bc221f..d588582 100644
--- a/components/guest_view/browser/BUILD.gn
+++ b/components/guest_view/browser/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("browser") {
+source_set("browser") {
output_name = "guest_view_browser"
sources = [
"//components/guest_view/browser/guest_view.h",
@@ -22,13 +22,14 @@ static_library("browser") {
deps = [
"//base",
"//components/guest_view/common",
+ "//components/ui/zoom",
"//content/public/browser",
"//content/public/common",
"//third_party/WebKit/public:blink",
]
}
-static_library("test_support") {
+source_set("test_support") {
testonly = true
sources = [
"//components/guest_view/browser/test_guest_view_manager.cc",
diff --git a/components/invalidation/impl/BUILD.gn b/components/invalidation/impl/BUILD.gn
index 95be996..20034c1 100644
--- a/components/invalidation/impl/BUILD.gn
+++ b/components/invalidation/impl/BUILD.gn
@@ -5,7 +5,7 @@ if (is_android) {
import("//build/config/android/rules.gni")
}
-static_library("impl") {
+source_set("impl") {
sources = [
"invalidation_logger.cc",
"invalidation_logger.h",
@@ -91,14 +91,39 @@ static_library("impl") {
}
}
-group("unittests") {
+source_set("unit_tests") {
testonly = true
+ sources = [
+ "invalidation_logger_unittest.cc",
+ ]
deps = [
":impl",
":test_support",
+ "//testing/gmock",
+ "//testing/gtest",
]
+
if (is_android) {
+ sources += [ "invalidation_service_android_unittest.cc" ]
deps += [ ":jni_headers" ]
+ } else {
+ # Non-Android tests.
+ sources += [
+ "fake_invalidator_unittest.cc",
+ "gcm_network_channel_unittest.cc",
+ "invalidation_notifier_unittest.cc",
+ "invalidator_registrar_unittest.cc",
+ "non_blocking_invalidator_unittest.cc",
+ "object_id_invalidation_map_unittest.cc",
+ "p2p_invalidator_unittest.cc",
+ "push_client_channel_unittest.cc",
+ "registration_manager_unittest.cc",
+ "single_object_invalidation_set_unittest.cc",
+ "sync_invalidation_listener_unittest.cc",
+ "sync_system_resources_unittest.cc",
+ "ticl_invalidation_service_unittest.cc",
+ "unacked_invalidation_set_unittest.cc",
+ ]
}
}
@@ -123,13 +148,17 @@ static_library("test_support") {
"unacked_invalidation_set_test_util.h",
]
+ public_deps = [
+ ":impl",
+ "//jingle:notifier_test_util",
+ "//third_party/cacheinvalidation",
+ ]
deps = [
"//base",
"//components/gcm_driver:test_support",
"//components/keyed_service/core",
"//google_apis",
"//jingle:notifier",
- "//jingle:notifier_test_util",
"//net",
"//testing/gmock",
@@ -138,9 +167,6 @@ static_library("test_support") {
# "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
]
- public_deps = [
- "//third_party/cacheinvalidation",
- ]
if (is_android) {
deps += [ ":jni_headers" ]
diff --git a/components/keyed_service/content/BUILD.gn b/components/keyed_service/content/BUILD.gn
index dcd0523..78d87ff 100644
--- a/components/keyed_service/content/BUILD.gn
+++ b/components/keyed_service/content/BUILD.gn
@@ -31,3 +31,14 @@ component("content") {
"//content/public/common",
]
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "browser_context_dependency_manager_unittest.cc",
+ ]
+ deps = [
+ ":content",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/keyed_service/core/BUILD.gn b/components/keyed_service/core/BUILD.gn
index 31f621b..a89949f 100644
--- a/components/keyed_service/core/BUILD.gn
+++ b/components/keyed_service/core/BUILD.gn
@@ -35,3 +35,14 @@ component("core") {
"//components/user_prefs",
]
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "dependency_graph_unittest.cc",
+ ]
+ deps = [
+ ":core",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn
index 58e88bf..4796d5c 100644
--- a/components/metrics/BUILD.gn
+++ b/components/metrics/BUILD.gn
@@ -177,9 +177,11 @@ if (is_linux) {
source_set("unit_tests") {
testonly = true
sources = [
+ "call_stack_profile_metrics_provider_unittest.cc",
"compression_utils_unittest.cc",
"daily_event_unittest.cc",
"drive_metrics_provider_unittest.cc",
+ "gpu/gpu_metrics_provider_unittest.cc",
"histogram_encoder_unittest.cc",
"machine_id_provider_win_unittest.cc",
"metrics_hashes_unittest.cc",
@@ -188,13 +190,16 @@ source_set("unit_tests") {
"metrics_reporting_scheduler_unittest.cc",
"metrics_service_unittest.cc",
"metrics_state_manager_unittest.cc",
+ "net/net_metrics_log_uploader_unittest.cc",
"persisted_logs_unittest.cc",
"profiler/profiler_metrics_provider_unittest.cc",
"profiler/tracking_synchronizer_unittest.cc",
]
deps = [
+ ":gpu",
":metrics",
+ ":net",
":profiler",
":test_support",
"//base:prefs_test_support",
diff --git a/components/navigation_interception/BUILD.gn b/components/navigation_interception/BUILD.gn
index 788c2d7..12456ff 100644
--- a/components/navigation_interception/BUILD.gn
+++ b/components/navigation_interception/BUILD.gn
@@ -6,7 +6,7 @@ if (is_android) {
import("//build/config/android/rules.gni")
}
-static_library("navigation_interception") {
+source_set("navigation_interception") {
sources = [
"intercept_navigation_resource_throttle.cc",
"intercept_navigation_resource_throttle.h",
@@ -45,3 +45,16 @@ if (is_android) {
jni_package = "navigation_interception"
}
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "intercept_navigation_resource_throttle_unittest.cc",
+ ]
+ deps = [
+ ":navigation_interception",
+ "//content/public/browser",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/rappor/BUILD.gn b/components/rappor/BUILD.gn
index 416d69c..5c6e321 100644
--- a/components/rappor/BUILD.gn
+++ b/components/rappor/BUILD.gn
@@ -3,7 +3,7 @@
# found in the LICENSE file.
# GYP version: components/rappor.gypi:rappor
-static_library("rappor") {
+source_set("rappor") {
sources = [
"bloom_filter.cc",
"bloom_filter.h",
diff --git a/components/search/BUILD.gn b/components/search/BUILD.gn
index 21c49c4d..8e18d8c 100644
--- a/components/search/BUILD.gn
+++ b/components/search/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("search") {
+source_set("search") {
sources = [
"search.cc",
"search.h",
@@ -17,3 +17,15 @@ static_library("search") {
"//url",
]
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "search_android_unittest.cc",
+ "search_unittest.cc",
+ ]
+ deps = [
+ ":search",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/search_engines/BUILD.gn b/components/search_engines/BUILD.gn
index c5aeec9..4c555bd 100644
--- a/components/search_engines/BUILD.gn
+++ b/components/search_engines/BUILD.gn
@@ -86,12 +86,31 @@ source_set("test_support") {
"testing_search_terms_data.h",
]
- deps = [
+ public_deps = [
":search_engines",
"//testing/gtest",
]
}
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "default_search_manager_unittest.cc",
+ "default_search_policy_handler_unittest.cc",
+ "default_search_pref_migration_unittest.cc",
+ "keyword_table_unittest.cc",
+ "search_host_to_urls_map_unittest.cc",
+ "template_url_prepopulate_data_unittest.cc",
+ "template_url_service_util_unittest.cc",
+ "template_url_unittest.cc",
+ ]
+ deps = [
+ ":test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
+
json_to_struct("prepopulated_engines") {
visibility = [ ":*" ]
diff --git a/components/sessions/BUILD.gn b/components/sessions/BUILD.gn
index 8d60064..95e9a2c 100644
--- a/components/sessions/BUILD.gn
+++ b/components/sessions/BUILD.gn
@@ -124,11 +124,17 @@ if (!is_ios && !is_android) {
source_set("unit_tests") {
testonly = true
sources = [
+ "content/content_serialized_navigation_builder_unittest.cc",
+ "content/content_serialized_navigation_driver_unittest.cc",
+ "ios/ios_serialized_navigation_builder_unittest.cc",
+ "ios/ios_serialized_navigation_driver_unittest.cc",
+ "serialized_navigation_entry_unittest.cc",
"session_backend_unittest.cc",
"session_types_unittest.cc",
]
deps = [
":sessions",
+ ":test_support",
"//base/test:test_support",
"//testing/gtest",
"//third_party/protobuf:protobuf_lite",
diff --git a/components/suggestions/BUILD.gn b/components/suggestions/BUILD.gn
index 5829176..389a19b 100644
--- a/components/suggestions/BUILD.gn
+++ b/components/suggestions/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("suggestions") {
+source_set("suggestions") {
sources = [
"blacklist_store.cc",
"blacklist_store.h",
@@ -21,17 +21,19 @@ static_library("suggestions") {
"suggestions_utils.h",
]
- deps = [
+ public_deps = [
"//base",
- "//components/keyed_service/core",
- "//components/pref_registry",
"//components/suggestions/proto",
- "//components/variations",
- "//components/variations/net",
"//net",
"//ui/gfx",
"//url",
]
+ deps = [
+ "//components/keyed_service/core",
+ "//components/pref_registry",
+ "//components/variations",
+ "//components/variations/net",
+ ]
if (is_ios) {
sources += [ "image_encoder_ios.mm" ]
@@ -39,3 +41,18 @@ static_library("suggestions") {
sources += [ "image_encoder.cc" ]
}
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "blacklist_store_unittest.cc",
+ "image_manager_unittest.cc",
+ "suggestions_service_unittest.cc",
+ "suggestions_store_unittest.cc",
+ ]
+ deps = [
+ ":suggestions",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/sync_driver/BUILD.gn b/components/sync_driver/BUILD.gn
index c2fcfa9..ec03122 100644
--- a/components/sync_driver/BUILD.gn
+++ b/components/sync_driver/BUILD.gn
@@ -4,7 +4,7 @@
import("//build/config/features.gni")
-static_library("sync_driver") {
+source_set("sync_driver") {
sources = [
"backend_data_type_configurer.cc",
"backend_data_type_configurer.h",
@@ -98,6 +98,7 @@ static_library("sync_driver") {
"//components/history/core/browser",
"//components/invalidation/public",
"//components/os_crypt",
+ "//components/sessions",
"//components/signin/core/browser",
"//net",
"//sync",
@@ -109,41 +110,14 @@ static_library("sync_driver") {
"sync_policy_handler.cc",
"sync_policy_handler.h",
]
+ deps += [
+ "//components/policy",
+ "//components/policy:policy_component",
+ ]
}
}
-source_set("unit_tests") {
- testonly = true
- sources = [
- "data_type_manager_impl_unittest.cc",
- "device_info_data_type_controller_unittest.cc",
- "device_info_sync_service_unittest.cc",
- "generic_change_processor_unittest.cc",
- "model_association_manager_unittest.cc",
- "non_blocking_data_type_controller_unittest.cc",
- "non_ui_data_type_controller_unittest.cc",
- "shared_change_processor_unittest.cc",
- "sync_policy_handler_unittest.cc",
- "sync_prefs_unittest.cc",
- "sync_stopped_reporter_unittest.cc",
- "system_encryptor_unittest.cc",
- "tab_node_pool_unittest.cc",
- "ui_data_type_controller_unittest.cc",
- ]
-
- deps = [
- ":sync_driver",
- ":test_support",
- "//base",
- "//components/os_crypt",
- "//components/pref_registry",
- "//sync",
- "//testing/gmock",
- "//testing/gtest",
- ]
-}
-
-static_library("test_support") {
+source_set("test_support") {
testonly = true
sources = [
"change_processor_mock.cc",
@@ -166,13 +140,40 @@ static_library("test_support") {
"non_ui_data_type_controller_mock.h",
]
- deps = [
+ public_deps = [
":sync_driver",
+ "//sync",
+ ]
+
+ deps = [
"//base",
"//components/sessions",
- "//sync",
"//sync:test_support_sync_internal_api",
"//testing/gmock",
"//testing/gtest",
]
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "data_type_manager_impl_unittest.cc",
+ "device_info_data_type_controller_unittest.cc",
+ "device_info_sync_service_unittest.cc",
+ "generic_change_processor_unittest.cc",
+ "model_association_manager_unittest.cc",
+ "non_blocking_data_type_controller_unittest.cc",
+ "non_ui_data_type_controller_unittest.cc",
+ "shared_change_processor_unittest.cc",
+ "sync_policy_handler_unittest.cc",
+ "sync_prefs_unittest.cc",
+ "system_encryptor_unittest.cc",
+ "tab_node_pool_unittest.cc",
+ "ui_data_type_controller_unittest.cc",
+ ]
+ deps = [
+ ":test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
diff --git a/components/ui/zoom/BUILD.gn b/components/ui/zoom/BUILD.gn
index 8774b0d..127fec2 100644
--- a/components/ui/zoom/BUILD.gn
+++ b/components/ui/zoom/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("ui_zoom") {
+source_set("zoom") {
sources = [
"page_zoom.cc",
"page_zoom.h",
diff --git a/components/ui_zoom.gypi b/components/ui_zoom.gypi
index 15e988d..ddab2ca 100644
--- a/components/ui_zoom.gypi
+++ b/components/ui_zoom.gypi
@@ -5,6 +5,7 @@
{
'targets': [
{
+ # GN version: //components/ui/zoom
'target_name': 'ui_zoom',
'type': 'static_library',
'include_dirs': [
diff --git a/components/web_modal/BUILD.gn b/components/web_modal/BUILD.gn
index 45733c7..77083a7 100644
--- a/components/web_modal/BUILD.gn
+++ b/components/web_modal/BUILD.gn
@@ -26,6 +26,7 @@ static_library("web_modal") {
}
static_library("test_support") {
+ testonly = true
sources = [
"test_web_contents_modal_dialog_host.cc",
"test_web_contents_modal_dialog_host.h",
@@ -33,8 +34,10 @@ static_library("test_support") {
"test_web_contents_modal_dialog_manager_delegate.h",
]
- deps = [
+ public_deps = [
":web_modal",
+ ]
+ deps = [
"//base",
"//ui/gfx",
"//ui/gfx/geometry",
diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn
index 8e75e4c..9c9424e 100644
--- a/extensions/browser/BUILD.gn
+++ b/extensions/browser/BUILD.gn
@@ -17,7 +17,7 @@ source_set("browser") {
"//components/keyed_service/core",
"//components/pref_registry",
"//components/sessions",
- "//components/ui/zoom:ui_zoom",
+ "//components/ui/zoom",
"//components/web_cache/browser",
"//components/web_modal",
"//content/public/browser",
diff --git a/jingle/BUILD.gn b/jingle/BUILD.gn
index 3b6e0a2..74030bc 100644
--- a/jingle/BUILD.gn
+++ b/jingle/BUILD.gn
@@ -103,8 +103,11 @@ if (enable_webrtc || !is_android) {
"notifier/listener/fake_push_client_observer.cc",
"notifier/listener/fake_push_client_observer.h",
]
- deps = [
+ public_deps = [
+ ":jingle_glue",
":notifier",
+ ]
+ deps = [
"//base",
"//testing/gmock",
]
diff --git a/pdf/BUILD.gn b/pdf/BUILD.gn
index 811ee53..9c2d45d 100644
--- a/pdf/BUILD.gn
+++ b/pdf/BUILD.gn
@@ -50,7 +50,7 @@ static_library("pdf") {
deps = [
"//base",
- "//components/ui/zoom:ui_zoom",
+ "//components/ui/zoom",
"//content/public/common",
"//net",
"//ppapi/cpp:objects",