diff --git a/cobalt/browser/BUILD.gn b/cobalt/browser/BUILD.gn index cc9d76266083..25e387a2aa15 100644 --- a/cobalt/browser/BUILD.gn +++ b/cobalt/browser/BUILD.gn @@ -415,3 +415,10 @@ cache_lex_tables("cached_lex_yacc_tables") { cache_templates("cached_jinja_templates") { output_dir = _bindings_scripts_output_dir } + +group("test_dependencies_on_browser") { + testonly = true + + # TODO: 297087147 - Depend on smaller targets than browser. + deps = [ "//cobalt/browser" ] +} diff --git a/cobalt/browser/metrics/BUILD.gn b/cobalt/browser/metrics/BUILD.gn index 3f25f1a9fa85..62c85fa5e558 100644 --- a/cobalt/browser/metrics/BUILD.gn +++ b/cobalt/browser/metrics/BUILD.gn @@ -51,6 +51,7 @@ target(gtest_target_type, "metrics_test") { deps = [ ":metrics", "//base", + "//cobalt//browser:test_dependencies_on_browser", "//cobalt/browser:generated_types", "//cobalt/h5vcc", "//cobalt/h5vcc:metric_event_handler_wrapper", diff --git a/cobalt/css_parser/BUILD.gn b/cobalt/css_parser/BUILD.gn index e7be240449fc..8cbc194def3b 100644 --- a/cobalt/css_parser/BUILD.gn +++ b/cobalt/css_parser/BUILD.gn @@ -122,6 +122,7 @@ target(gtest_target_type, "css_parser_test") { ":css_grammar", ":css_parser", "//base", + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/cssom", "//cobalt/dom", "//cobalt/test:run_all_unittests", diff --git a/cobalt/cssom/BUILD.gn b/cobalt/cssom/BUILD.gn index e5b1d47a7f1c..04dae86c766b 100644 --- a/cobalt/cssom/BUILD.gn +++ b/cobalt/cssom/BUILD.gn @@ -319,6 +319,7 @@ target(gtest_target_type, "cssom_test") { deps = [ "//cobalt/base", + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/css_parser", "//cobalt/cssom", "//cobalt/dom", diff --git a/cobalt/layout/BUILD.gn b/cobalt/layout/BUILD.gn index 79663654bb55..36c0181aaf3f 100644 --- a/cobalt/layout/BUILD.gn +++ b/cobalt/layout/BUILD.gn @@ -140,6 +140,7 @@ target(gtest_target_type, "layout_test") { deps = [ ":layout", "//base", + "//cobalt//browser:test_dependencies_on_browser", "//cobalt/base", "//cobalt/css_parser", "//cobalt/cssom", diff --git a/cobalt/loader/BUILD.gn b/cobalt/loader/BUILD.gn index 2db902d75f34..9b808f9d95e4 100644 --- a/cobalt/loader/BUILD.gn +++ b/cobalt/loader/BUILD.gn @@ -195,6 +195,7 @@ target(gtest_target_type, "loader_test") { deps = [ ":loader", "//cobalt/base:base", + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/dom", "//cobalt/dom_parser", "//cobalt/math:math", diff --git a/cobalt/loader/image/sandbox/BUILD.gn b/cobalt/loader/image/sandbox/BUILD.gn index adf6ab1f74dc..dbfc6a2e8a6e 100644 --- a/cobalt/loader/image/sandbox/BUILD.gn +++ b/cobalt/loader/image/sandbox/BUILD.gn @@ -18,10 +18,12 @@ # This target will build a sandbox application that allows for easy # experimentation with the ImageDecoder on any platform. target(final_executable_type, "image_decoder_sandbox") { + testonly = true sources = [ "image_decoder_sandbox.cc" ] deps = [ "//cobalt/base", + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/loader", "//cobalt/loader:copy_loader_test_data", "//cobalt/math", diff --git a/cobalt/media/BUILD.gn b/cobalt/media/BUILD.gn index 813baa2958d3..27d33933882e 100644 --- a/cobalt/media/BUILD.gn +++ b/cobalt/media/BUILD.gn @@ -129,6 +129,7 @@ target(gtest_target_type, "media_test") { deps = [ ":media", "//base/test:test_support", + "//cobalt//browser:test_dependencies_on_browser", "//cobalt/base", "//cobalt/test:run_all_unittests", "//testing/gmock", diff --git a/cobalt/media/sandbox/BUILD.gn b/cobalt/media/sandbox/BUILD.gn index 19be83551b45..84d2620bdb9a 100644 --- a/cobalt/media/sandbox/BUILD.gn +++ b/cobalt/media/sandbox/BUILD.gn @@ -16,9 +16,11 @@ # media/renderer interface. target(final_executable_type, "media_sandbox") { + testonly = true sources = [ "media2_sandbox.cc" ] deps = [ + "//cobalt//browser:test_dependencies_on_browser", "//cobalt/base", "//cobalt/math", "//cobalt/media", @@ -28,6 +30,7 @@ target(final_executable_type, "media_sandbox") { } target(final_executable_type, "web_media_player_sandbox") { + testonly = true sources = [ "format_guesstimator.cc", "format_guesstimator.h", @@ -42,6 +45,7 @@ target(final_executable_type, "web_media_player_sandbox") { "//cobalt/base", # Use test data from demos to avoid keeping two copies of video files. + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/demos/content:demos_testdata", "//cobalt/loader", "//cobalt/math", diff --git a/cobalt/renderer/BUILD.gn b/cobalt/renderer/BUILD.gn index 2b4ac9df37a4..54d218741fce 100644 --- a/cobalt/renderer/BUILD.gn +++ b/cobalt/renderer/BUILD.gn @@ -128,6 +128,7 @@ target(gtest_target_type, "renderer_test") { ":renderer", ":renderer_headers_only", "//base:i18n", + "//cobalt//browser:test_dependencies_on_browser", "//cobalt/base", "//cobalt/loader", "//cobalt/math", diff --git a/cobalt/renderer/sandbox/BUILD.gn b/cobalt/renderer/sandbox/BUILD.gn index 30d7def06c7b..bf1b00b19187 100644 --- a/cobalt/renderer/sandbox/BUILD.gn +++ b/cobalt/renderer/sandbox/BUILD.gn @@ -20,10 +20,12 @@ # also be useful for visually inspecting the output that the Cobalt # renderer is producing. target(final_executable_type, "renderer_sandbox") { + testonly = true sources = [ "renderer_sandbox_main.cc" ] deps = [ "//cobalt/base", + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/math", "//cobalt/renderer", "//cobalt/renderer/test/scenes", @@ -39,10 +41,12 @@ target(final_executable_type, "renderer_sandbox") { # is constantly animating, which for many implementations can be a # performance problem. target(final_executable_type, "scaling_text_sandbox") { + testonly = true sources = [ "scaling_text_sandbox_main.cc" ] deps = [ "//cobalt/base", + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/math", "//cobalt/renderer", "//cobalt/renderer/test/scenes", diff --git a/cobalt/ui_navigation/scroll_engine/BUILD.gn b/cobalt/ui_navigation/scroll_engine/BUILD.gn index 980b3fdbd407..25dc91b8014b 100644 --- a/cobalt/ui_navigation/scroll_engine/BUILD.gn +++ b/cobalt/ui_navigation/scroll_engine/BUILD.gn @@ -34,6 +34,7 @@ target(gtest_target_type, "scroll_engine_tests") { sources = [ "free_scrolling_nav_item_test.cc" ] deps = [ ":scroll_engine", + "//cobalt//browser:test_dependencies_on_browser", "//cobalt/base", "//cobalt/test:run_all_unittests", "//testing/gmock", diff --git a/cobalt/web_animations/BUILD.gn b/cobalt/web_animations/BUILD.gn index 7ee67ce7addb..6d4f09f41385 100644 --- a/cobalt/web_animations/BUILD.gn +++ b/cobalt/web_animations/BUILD.gn @@ -53,6 +53,7 @@ target(gtest_target_type, "web_animations_test") { deps = [ ":web_animations", + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/css_parser", "//cobalt/cssom", "//cobalt/dom", diff --git a/cobalt/worker/BUILD.gn b/cobalt/worker/BUILD.gn index 419369186c3d..4b07e542c8a8 100644 --- a/cobalt/worker/BUILD.gn +++ b/cobalt/worker/BUILD.gn @@ -104,6 +104,7 @@ target(gtest_target_type, "worker_test") { "//cobalt/browser:browser", "//cobalt/browser:generated_bindings", "//cobalt/browser:generated_types", + "//cobalt/browser:test_dependencies_on_browser", "//cobalt/css_parser", "//cobalt/cssom", "//cobalt/dom/testing:dom_testing", diff --git a/content/browser/speech/BUILD.gn b/content/browser/speech/BUILD.gn index 6e5ae3091877..21ba4c7669b3 100644 --- a/content/browser/speech/BUILD.gn +++ b/content/browser/speech/BUILD.gn @@ -39,6 +39,7 @@ target(gtest_target_type, "speech_test") { ] deps = [ ":speech", + "//cobalt//browser:test_dependencies_on_browser", "//cobalt/media", "//cobalt/test:run_all_unittests", "//starboard",