summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryosin <yosin@chromium.org>2015-08-22 05:05:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-22 12:06:31 +0000
commit1dc9aa14380b7c6c77d80354b86f55ede462766e (patch)
tree882e6d1e47ae4aeaf2c7d93aa2f276d2e955a21c
parent027a930a4f456a173b5c01d8537185187698caeb (diff)
downloadchromium_src-1dc9aa14380b7c6c77d80354b86f55ede462766e.zip
chromium_src-1dc9aa14380b7c6c77d80354b86f55ede462766e.tar.gz
chromium_src-1dc9aa14380b7c6c77d80354b86f55ede462766e.tar.bz2
Revert of Add more components_unittests to GN build (patchset #5 id:80001 of https://codereview.chromium.org/1303703004/ )
Reason for revert: Compilation error in storage_monitor_win_unittest.cc. GYP build may not compile this file. FAILED: ninja -t msvc -e environment.x64 -- E:\b\build\goma/gomacc.exe "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64/cl.exe" /nologo /showIncludes /FC @obj/components/storage_monitor/unit_tests/storage_monitor_win_unittest.obj.rsp /c ../../components/storage_monitor/storage_monitor_win_unittest.cc /Foobj/components/storage_monitor/unit_tests/storage_monitor_win_unittest.obj /Fdobj/components/storage_monitor/unit_tests_cc.pdb e:\b\build\slave\win_x64_gn__dbg_\build\src\components\storage_monitor\storage_monitor_win_unittest.cc(218) : error C2220: warning treated as error - no 'object' file generated e:\b\build\slave\win_x64_gn__dbg_\build\src\components\storage_monitor\storage_monitor_win_unittest.cc(218) : warning C4267: '=' : conversion from 'size_t' to 'DWORD', possible loss of data e:\b\build\slave\win_x64_gn__dbg_\build\src\components\storage_monitor\storage_monitor_win_unittest.cc(298) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data ninja: build stopped: subcommand failed. Original issue's description: > Add more components_unittests to GN build > > This adds tests for: url matcher, precache, sync driver, serialization, proxy config, leveldb proto, error page, storage monitor, search provider logos, translate, json schema, guest view, dom distiller, network hints. > > CQ_EXTRA_TRYBOTS=tryserver.chromium.mac:mac_chromium_gn_rel > > Committed: https://crrev.com/c76a816074e6504b0b4b3420529928057d11b50b > Cr-Commit-Position: refs/heads/master@{#344974} TBR=dpranke@chromium.org,brettw@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1313463002 Cr-Commit-Position: refs/heads/master@{#344976}
-rw-r--r--BUILD.gn2
-rw-r--r--build/gn_migration.gypi2
-rw-r--r--chromeos/BUILD.gn6
-rw-r--r--components/BUILD.gn23
-rw-r--r--components/components_tests.gyp1
-rw-r--r--components/dom_distiller/content/BUILD.gn102
-rw-r--r--components/dom_distiller/core/BUILD.gn1
-rw-r--r--components/error_page/renderer/BUILD.gn13
-rw-r--r--components/guest_view/browser/BUILD.gn13
-rw-r--r--components/json_schema/BUILD.gn15
-rw-r--r--components/leveldb_proto/BUILD.gn14
-rw-r--r--components/metrics/BUILD.gn5
-rw-r--r--components/network_hints/renderer/BUILD.gn12
-rw-r--r--components/precache/content/BUILD.gn14
-rw-r--r--components/precache/core/BUILD.gn17
-rw-r--r--components/proxy_config/BUILD.gn12
-rw-r--r--components/search_provider_logos/BUILD.gn22
-rw-r--r--components/storage_monitor/BUILD.gn38
-rw-r--r--components/sync_driver/BUILD.gn1
-rw-r--r--components/translate/core/browser/BUILD.gn15
-rw-r--r--components/translate/core/common/BUILD.gn12
-rw-r--r--components/translate/core/language_detection/BUILD.gn20
-rw-r--r--components/url_matcher/BUILD.gn17
23 files changed, 71 insertions, 306 deletions
diff --git a/BUILD.gn b/BUILD.gn
index cb1880b..a288521 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",
+ "//components/ui/zoom:ui_zoom",
"//content",
"//content/test:test_support",
"//device/battery",
diff --git a/build/gn_migration.gypi b/build/gn_migration.gypi
index 5aef3fb..55b63e2 100644
--- a/build/gn_migration.gypi
+++ b/build/gn_migration.gypi
@@ -419,7 +419,7 @@
# TODO(GYP): remove these when the corresponding root targets work.
#"//cc/blink",
- #"//components/ui/zoom",
+ #"//components/ui/zoom:ui_zoom",
#"//content",
#"//content/test:test_support",
#"//device/battery",
diff --git a/chromeos/BUILD.gn b/chromeos/BUILD.gn
index 5b9a574..ea0a9d0 100644
--- a/chromeos/BUILD.gn
+++ b/chromeos/BUILD.gn
@@ -43,15 +43,15 @@ component("chromeos") {
defines = [ "CHROMEOS_IMPLEMENTATION" ]
}
-source_set("test_support") {
+static_library("test_support") {
testonly = true
configs += [ "//build/config/linux:dbus" ]
- public_deps = [
+ deps = [
+ "//testing/gmock",
":chromeos",
":cryptohome_proto",
":power_manager_proto",
":test_support_without_gmock",
- "//testing/gmock",
]
sources = [
"attestation/mock_attestation_flow.cc",
diff --git a/components/BUILD.gn b/components/BUILD.gn
index 1f01f37..301f780 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -65,9 +65,6 @@ group("all_components") {
"//components/mime_util",
"//components/navigation_interception",
"//components/navigation_metrics",
- "//components/network_hints/browser",
- "//components/network_hints/common",
- "//components/network_hints/renderer",
"//components/network_time",
"//components/offline_pages",
"//components/omnibox/browser",
@@ -171,7 +168,6 @@ group("all_components") {
deps -= [
"//components/history/content/browser",
"//components/keyed_service/content",
- "//components/network_hints/renderer",
]
}
@@ -313,7 +309,6 @@ test("components_unittests") {
"//components/data_reduction_proxy/core/common:unit_tests",
"//components/device_event_log:unit_tests",
"//components/devtools_http_handler:unit_tests",
- "//components/dom_distiller/content:unit_tests",
"//components/dom_distiller/core:unit_tests",
"//components/domain_reliability:unit_tests",
"//components/enhanced_bookmarks:unit_tests",
@@ -328,10 +323,8 @@ test("components_unittests") {
"//components/history/core/browser:unit_tests",
"//components/history/core/common:unit_tests",
"//components/invalidation/impl:unit_tests",
- "//components/json_schema:unit_tests",
"//components/keyed_service/content:unit_tests",
"//components/keyed_service/core:unit_tests",
- "//components/leveldb_proto:unit_tests",
"//components/login:unit_tests",
"//components/metrics:unit_tests",
"//components/mime_util:unit_tests",
@@ -343,22 +336,14 @@ 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/precache/content:unit_tests",
- "//components/precache/core:unit_tests",
- "//components/proxy_config:unit_tests",
"//components/rappor:unit_tests",
"//components/search:unit_tests",
"//components/search_engines:unit_tests",
- "//components/search_provider_logos:unit_tests",
"//components/signin/core/browser:unit_tests",
"//components/suggestions:unit_tests",
"//components/sync_driver:unit_tests",
- "//components/translate/core/browser:unit_tests",
- "//components/translate/core/common:unit_tests",
- "//components/translate/core/language_detection:unit_tests",
"//components/undo:unit_tests",
"//components/url_formatter:unit_tests",
- "//components/url_matcher:unit_tests",
"//components/update_client:unit_tests",
"//components/upload_list:unit_tests",
"//components/user_prefs/tracked:unit_tests",
@@ -408,7 +393,6 @@ test("components_unittests") {
"//components/feedback:unit_tests",
"//components/proximity_auth:unit_tests",
"//components/sessions:unit_tests",
- "//components/storage_monitor:unit_tests",
]
}
@@ -440,13 +424,10 @@ test("components_unittests") {
if (is_ios) {
deps += [ "//components/signin/core/browser:unit_tests" ]
deps -= [ "//components/devtools_http_handler:unit_tests" ]
- } else {
- # Non-iOS tests.
+ }
+ if (!is_ios) {
deps += [
- "//components/error_page/renderer:unit_tests",
- "//components/guest_view/browser:unit_tests",
"//components/navigation_interception:unit_tests",
- "//components/network_hints/renderer:unit_tests",
"//components/safe_json:unit_tests",
"//components/scheduler:unit_tests",
]
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 4e4a6bc..c18d832 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -618,7 +618,6 @@
'translate/core/common/translate_metrics_unittest.cc',
'translate/core/common/translate_util_unittest.cc',
'translate/core/language_detection/language_detection_util_unittest.cc',
- # TODO(GYP) bug 523060: these translate tests on iOS.
'translate/ios/browser/js_translate_manager_unittest.mm',
'translate/ios/browser/language_detection_controller_unittest.mm',
'translate/ios/browser/translate_controller_unittest.mm',
diff --git a/components/dom_distiller/content/BUILD.gn b/components/dom_distiller/content/BUILD.gn
index 7f018a9..9ba3899 100644
--- a/components/dom_distiller/content/BUILD.gn
+++ b/components/dom_distiller/content/BUILD.gn
@@ -2,67 +2,55 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-assert(!is_ios)
-
-# GYP version: components/dom_distiller.gypi:dom_distiller_content
-source_set("content_browser") {
- sources = [
- "browser/distillable_page_utils.cc",
- "browser/distillable_page_utils.h",
- "browser/distiller_javascript_utils.cc",
- "browser/distiller_javascript_utils.h",
- "browser/distiller_page_web_contents.cc",
- "browser/distiller_page_web_contents.h",
- "browser/dom_distiller_viewer_source.cc",
- "browser/dom_distiller_viewer_source.h",
- "browser/external_feedback_reporter.h",
- "browser/web_contents_main_frame_observer.cc",
- "browser/web_contents_main_frame_observer.h",
- ]
-
- public_deps = [
- "//components/dom_distiller/core",
- "//content/public/browser",
- ]
- deps = [
- "//base",
- "//components/resources",
- "//components/strings",
- "//net",
- "//skia",
- "//sync",
- "//ui/gfx",
- "//url",
- ]
+if (!is_ios) {
+ # GYP version: components/dom_distiller.gypi:dom_distiller_content
+ static_library("content_browser") {
+ sources = [
+ "browser/distillable_page_utils.cc",
+ "browser/distillable_page_utils.h",
+ "browser/distiller_javascript_utils.cc",
+ "browser/distiller_javascript_utils.h",
+ "browser/distiller_page_web_contents.cc",
+ "browser/distiller_page_web_contents.h",
+ "browser/dom_distiller_viewer_source.cc",
+ "browser/dom_distiller_viewer_source.h",
+ "browser/external_feedback_reporter.h",
+ "browser/web_contents_main_frame_observer.cc",
+ "browser/web_contents_main_frame_observer.h",
+ ]
- if (is_android) {
- sources += [
- "browser/distillable_page_utils_android.cc",
- "browser/distillable_page_utils_android.h",
+ public_deps = [
+ "//components/dom_distiller/core",
+ ]
+ deps = [
+ "//base",
+ "//components/resources",
+ "//components/strings",
+ "//content/public/browser",
+ "//net",
+ "//skia",
+ "//sync",
+ "//ui/gfx",
+ "//url",
]
- deps += [ ":jni_headers" ]
+
+ if (is_android) {
+ sources += [
+ "browser/distillable_page_utils_android.cc",
+ "browser/distillable_page_utils_android.h",
+ ]
+ deps += [ ":jni_headers" ]
+ }
}
-}
-if (is_android) {
- import("//build/config/android/rules.gni")
+ if (is_android) {
+ import("//build/config/android/rules.gni")
- generate_jni("jni_headers") {
- sources = [
- "../android/java/src/org/chromium/components/dom_distiller/content/DistillablePageUtils.java",
- ]
- jni_package = "dom_distiller_content"
+ generate_jni("jni_headers") {
+ sources = [
+ "../android/java/src/org/chromium/components/dom_distiller/content/DistillablePageUtils.java",
+ ]
+ jni_package = "dom_distiller_content"
+ }
}
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "browser/dom_distiller_viewer_source_unittest.cc",
- "browser/web_contents_main_frame_observer_unittest.cc",
- ]
- deps = [
- ":content_browser",
- "//testing/gtest",
- ]
-}
diff --git a/components/dom_distiller/core/BUILD.gn b/components/dom_distiller/core/BUILD.gn
index f07e024..2d12abd 100644
--- a/components/dom_distiller/core/BUILD.gn
+++ b/components/dom_distiller/core/BUILD.gn
@@ -118,7 +118,6 @@ source_set("unit_tests") {
testonly = true
sources = [
"article_entry_unittest.cc",
- "distillable_page_detector_unittest.cc",
"distilled_content_store_unittest.cc",
"distilled_page_prefs_unittests.cc",
"distiller_unittest.cc",
diff --git a/components/error_page/renderer/BUILD.gn b/components/error_page/renderer/BUILD.gn
index 83c49a1..bafaada 100644
--- a/components/error_page/renderer/BUILD.gn
+++ b/components/error_page/renderer/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.
-source_set("renderer") {
+static_library("renderer") {
sources = [
"net_error_helper_core.cc",
"net_error_helper_core.h",
@@ -20,14 +20,3 @@ source_set("renderer") {
"//url",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "net_error_helper_core_unittest.cc",
- ]
- deps = [
- ":renderer",
- "//testing/gtest",
- ]
-}
diff --git a/components/guest_view/browser/BUILD.gn b/components/guest_view/browser/BUILD.gn
index 0aba612..d588582 100644
--- a/components/guest_view/browser/BUILD.gn
+++ b/components/guest_view/browser/BUILD.gn
@@ -36,19 +36,8 @@ source_set("test_support") {
"//components/guest_view/browser/test_guest_view_manager.h",
]
- public_deps = [
+ deps = [
":browser",
"//content/test:test_support",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "guest_view_manager_unittest.cc",
- ]
- deps = [
- ":test_support",
- "//testing/gtest",
- ]
-}
diff --git a/components/json_schema/BUILD.gn b/components/json_schema/BUILD.gn
index 4e7b435..8bcb7d5 100644
--- a/components/json_schema/BUILD.gn
+++ b/components/json_schema/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.
-source_set("json_schema") {
+static_library("json_schema") {
sources = [
"json_schema_constants.cc",
"json_schema_constants.h",
@@ -15,16 +15,3 @@ source_set("json_schema") {
"//third_party/re2",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "json_schema_validator_unittest.cc",
- "json_schema_validator_unittest_base.cc",
- "json_schema_validator_unittest_base.h",
- ]
- deps = [
- ":json_schema",
- "//testing/gtest",
- ]
-}
diff --git a/components/leveldb_proto/BUILD.gn b/components/leveldb_proto/BUILD.gn
index 03297f9..9743af0 100644
--- a/components/leveldb_proto/BUILD.gn
+++ b/components/leveldb_proto/BUILD.gn
@@ -21,20 +21,8 @@ source_set("test_support") {
"testing/fake_db.h",
]
- public_deps = [
+ deps = [
":leveldb_proto",
"//components/leveldb_proto/testing/proto",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "proto_database_impl_unittest.cc",
- ]
- deps = [
- ":test_support",
- "//testing/gmock",
- "//testing/gtest",
- ]
-}
diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn
index 3a5fd4d..4796d5c 100644
--- a/components/metrics/BUILD.gn
+++ b/components/metrics/BUILD.gn
@@ -208,10 +208,5 @@ source_set("unit_tests") {
"//content/public/common",
"//testing/gtest",
]
-
- if (is_linux) {
- sources += [ "serialization/serialization_utils_unittest.cc" ]
- deps += [ ":serialization" ]
- }
}
# TODO(GYP): metrics_chromeos
diff --git a/components/network_hints/renderer/BUILD.gn b/components/network_hints/renderer/BUILD.gn
index 8ddd2ab..48f52cd 100644
--- a/components/network_hints/renderer/BUILD.gn
+++ b/components/network_hints/renderer/BUILD.gn
@@ -21,15 +21,3 @@ source_set("renderer") {
"//third_party/WebKit/public:blink",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "dns_prefetch_queue_unittest.cc",
- "renderer_dns_prefetch_unittest.cc",
- ]
- deps = [
- ":renderer",
- "//testing/gtest",
- ]
-}
diff --git a/components/precache/content/BUILD.gn b/components/precache/content/BUILD.gn
index 57ca5e2..f3f7bd9 100644
--- a/components/precache/content/BUILD.gn
+++ b/components/precache/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.
-source_set("content") {
+static_library("content") {
sources = [
"precache_manager.cc",
"precache_manager.h",
@@ -17,15 +17,3 @@ source_set("content") {
"//url",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "precache_manager_unittest.cc",
- ]
- deps = [
- ":content",
- "//testing/gmock",
- "//testing/gtest",
- ]
-}
diff --git a/components/precache/core/BUILD.gn b/components/precache/core/BUILD.gn
index 4aa14d0..ca97225 100644
--- a/components/precache/core/BUILD.gn
+++ b/components/precache/core/BUILD.gn
@@ -18,7 +18,7 @@ config("precache_config") {
]
}
-source_set("core") {
+static_library("core") {
sources = [
"precache_database.cc",
"precache_database.h",
@@ -47,18 +47,3 @@ proto_library("proto") {
"proto/precache.proto",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "precache_database_unittest.cc",
- "precache_fetcher_unittest.cc",
- "precache_url_table_unittest.cc",
- ]
- deps = [
- ":core",
- ":proto",
- "//testing/gmock",
- "//testing/gtest",
- ]
-}
diff --git a/components/proxy_config/BUILD.gn b/components/proxy_config/BUILD.gn
index 7c68794..439fd30 100644
--- a/components/proxy_config/BUILD.gn
+++ b/components/proxy_config/BUILD.gn
@@ -19,15 +19,3 @@ component("proxy_config") {
"//net",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "proxy_config_dictionary_unittest.cc",
- "proxy_prefs_unittest.cc",
- ]
- deps = [
- ":proxy_config",
- "//testing/gtest",
- ]
-}
diff --git a/components/search_provider_logos/BUILD.gn b/components/search_provider_logos/BUILD.gn
index 2465112..aa38308 100644
--- a/components/search_provider_logos/BUILD.gn
+++ b/components/search_provider_logos/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.
-source_set("search_provider_logos") {
+static_library("search_provider_logos") {
sources = [
"google_logo_api.cc",
"google_logo_api.h",
@@ -14,27 +14,11 @@ source_set("search_provider_logos") {
"logo_tracker.h",
]
- public_deps = [
- "//base",
- "//skia",
- ]
-
deps = [
+ "//base",
"//net",
+ "//skia",
"//ui/gfx",
"//url",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "logo_cache_unittest.cc",
- "logo_tracker_unittest.cc",
- ]
- deps = [
- ":search_provider_logos",
- "//testing/gmock",
- "//testing/gtest",
- ]
-}
diff --git a/components/storage_monitor/BUILD.gn b/components/storage_monitor/BUILD.gn
index bb7034b..48b34d0 100644
--- a/components/storage_monitor/BUILD.gn
+++ b/components/storage_monitor/BUILD.gn
@@ -5,7 +5,7 @@
import("//build/config/features.gni")
# GYP version: components/storage_monitor.gypi:storage_monitor
-source_set("storage_monitor") {
+static_library("storage_monitor") {
sources = [
"image_capture_device.h",
"image_capture_device.mm",
@@ -85,7 +85,7 @@ source_set("storage_monitor") {
}
# GYP version: components/storage_monitor.gypi:storage_monitor_test_support
-source_set("test_support") {
+static_library("test_support") {
sources = [
"mock_removable_storage_observer.cc",
"mock_removable_storage_observer.h",
@@ -101,44 +101,16 @@ source_set("test_support") {
"test_volume_mount_watcher_win.h",
]
- public_deps = [
- ":storage_monitor",
+ deps = [
"//base",
+ ":storage_monitor",
]
if (is_linux) {
- deps = [
+ deps += [
"//device/media_transfer_protocol",
"//device/media_transfer_protocol:mtp_file_entry_proto",
"//device/media_transfer_protocol:mtp_storage_info_proto",
]
}
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "image_capture_device_manager_unittest.mm",
- "media_storage_util_unittest.cc",
- "media_transfer_protocol_device_observer_linux_unittest.cc",
- "storage_info_unittest.cc",
- "storage_monitor_mac_unittest.mm",
- "storage_monitor_unittest.cc",
- "storage_monitor_win_unittest.cc",
- ]
- deps = [
- ":test_support",
- "//testing/gtest",
- ]
-
- if (is_linux && !is_chromeos) {
- sources += [ "storage_monitor_linux_unittest.cc" ]
- }
- if (is_chromeos) {
- sources += [ "storage_monitor_chromeos_unittest.cc" ]
- deps += [
- "//chromeos:test_support",
- "//testing/gmock",
- ]
- }
-}
diff --git a/components/sync_driver/BUILD.gn b/components/sync_driver/BUILD.gn
index 8c6181c..ec03122 100644
--- a/components/sync_driver/BUILD.gn
+++ b/components/sync_driver/BUILD.gn
@@ -167,7 +167,6 @@ source_set("unit_tests") {
"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",
diff --git a/components/translate/core/browser/BUILD.gn b/components/translate/core/browser/BUILD.gn
index 862d2d0..13728f4 100644
--- a/components/translate/core/browser/BUILD.gn
+++ b/components/translate/core/browser/BUILD.gn
@@ -51,18 +51,3 @@ source_set("browser") {
"//url",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "language_state_unittest.cc",
- "translate_browser_metrics_unittest.cc",
- "translate_language_list_unittest.cc",
- "translate_prefs_unittest.cc",
- "translate_script_unittest.cc",
- ]
- deps = [
- ":browser",
- "//testing/gtest",
- ]
-}
diff --git a/components/translate/core/common/BUILD.gn b/components/translate/core/common/BUILD.gn
index e4f73c02..9cde65a 100644
--- a/components/translate/core/common/BUILD.gn
+++ b/components/translate/core/common/BUILD.gn
@@ -24,15 +24,3 @@ source_set("common") {
"//url",
]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "translate_metrics_unittest.cc",
- "translate_util_unittest.cc",
- ]
- deps = [
- ":common",
- "//testing/gtest",
- ]
-}
diff --git a/components/translate/core/language_detection/BUILD.gn b/components/translate/core/language_detection/BUILD.gn
index a1d15ef..57e1d10 100644
--- a/components/translate/core/language_detection/BUILD.gn
+++ b/components/translate/core/language_detection/BUILD.gn
@@ -4,7 +4,7 @@
import("//build/config/features.gni")
-source_set("language_detection") {
+static_library("language_detection") {
sources = [
"language_detection_util.cc",
"language_detection_util.h",
@@ -18,20 +18,8 @@ source_set("language_detection") {
if (cld_version == 1) {
deps += [ "//third_party/cld" ]
- } else if (cld_version == 2) {
- deps += [ "//third_party/cld_2:cld2_platform_impl" ]
- } else {
- assert(false, "Need a CLD version")
}
-}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "language_detection_util_unittest.cc",
- ]
- deps = [
- ":language_detection",
- "//testing/gtest",
- ]
+ if (cld_version == 2) {
+ deps += [ "//third_party/cld_2" ]
+ }
}
diff --git a/components/url_matcher/BUILD.gn b/components/url_matcher/BUILD.gn
index 9ba616f..7df189b 100644
--- a/components/url_matcher/BUILD.gn
+++ b/components/url_matcher/BUILD.gn
@@ -23,7 +23,7 @@ component("url_matcher") {
defines = [ "URL_MATCHER_IMPLEMENTATION" ]
- public_deps = [
+ deps = [
"//base",
"//base/third_party/dynamic_annotations",
"//third_party/re2",
@@ -32,18 +32,3 @@ component("url_matcher") {
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
}
-
-source_set("unit_tests") {
- testonly = true
- sources = [
- "regex_set_matcher_unittest.cc",
- "string_pattern_unittest.cc",
- "substring_set_matcher_unittest.cc",
- "url_matcher_factory_unittest.cc",
- "url_matcher_unittest.cc",
- ]
- deps = [
- ":url_matcher",
- "//testing/gtest",
- ]
-}