diff options
Diffstat (limited to 'chromium/content/BUILD.gn')
-rw-r--r-- | chromium/content/BUILD.gn | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/chromium/content/BUILD.gn b/chromium/content/BUILD.gn index cb50de5f703..56941b8f427 100644 --- a/chromium/content/BUILD.gn +++ b/chromium/content/BUILD.gn @@ -37,14 +37,31 @@ config("content_implementation") { # //content/public/browser and similar targets to avoid double-linking (these # targets make sure the dependency goes through the content shared library # when doing a component build). +# +# TESTS +# ----- +# Tests are a challenge. The content tests need to access internals of +# content/browser, for example, but the tests themselves are outside of the +# content component (which is a shared library in the component build). To +# prevent external-to-content targets from depending on private headers, +# the non-public content/browser target is not a public dep of the content +# component. But this means there is also no public path for the content +# tests and no way to restrict that just to //content/test/* if we added one. +# +# As a result, we check deps for //content/test/* only in non-component builds +# (which should verify the dependencies are correct for both component and +# non-component cases equally). There are targets like +# //content/browser:for_content_tests that allow content/test to depend on the +# //content/browser target only in non-component builds (when there are no +# linking problems) for when check is enabled. if (!is_nacl_nonsfi) { content_shared_components = [ "//content/gpu:gpu_sources", "//content/public/browser:browser_sources", "//content/public/child:child_sources", + "//content/public/gpu:gpu_sources", "//content/public/common:common_sources", - "//content/public/plugin:plugin_sources", "//content/public/renderer:renderer_sources", "//content/public/utility:utility_sources", ] @@ -93,11 +110,21 @@ grit("resources") { "grit/content_resources.h", "content_resources.pak", ] + grit_flags = [ + "-E", + "root_out_dir=" + rebase_path(root_out_dir, root_build_dir), + ] + deps = [ + "//content/public/app:browser_manifest", + "//content/public/app:renderer_manifest", + "//mojo/services/catalog:manifest", + ] } # This target exists to "hold" the content_export header so we can do proper # inclusion testing of it. source_set("export") { + # Must only be used inside of content. visibility = [ "//content/*" ] sources = [ "common/content_export.h", |