Remove test dependencies from content_shell_lib |
||||
Issue description
content_shell_lib is marked "testonly", so targets that depend on it must also be "testonly" (for example, app_shell via //extensions/shell:app_shell_lib).
Apparently, a bunch of test support is compiled into content_shell, and content_shell itself depends on testonly targets like:
"//components/test_runner:test_runner",
"//content/test:content_test_mojo_bindings",
"//content/test:layouttest_support",
"//content/test:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/WebKit/public:test_support",
Some of this code executes behind the --run-layout-test switch via switches::IsRunLayoutTestSwitchPresent(), which has a TODO for this in shell_switches.h[1].
content/shell/browser/shell.cc has several calls to switches::IsRunLayoutTestSwitchPresent() and #includes a bunch of files in content/shell/browser/layout_test.
Because AppShell -- which we hope to start shipping to some clients in the near future -- uses content_shell_lib, it includes all this test support, too.
Can we move these test dependencies to a separate target, either by #ifdefs in the //content code that does test stuff, or by moving this test stuff out of those files? Is there a good reason not to?
[1] https://cs.chromium.org/chromium/src/content/shell/common/shell_switches.h?type=cs&q=todo&sq=package:chromium&l=27
,
Mar 3 2017
,
Mar 3 2017
,
Apr 19 2017
Also investigating the alternative of removing app_shell's dependency on content_shell_lib: writing our own shell, sharing what we can with other shells but not directly depending on //content/shell. (But still using the content library itself, of course.)
,
Apr 19 2017
<adding more //content owners to CC> Sorry for missing this bug earlier. I think that anything that is useful for supporting a generic shell / supporting generic //content embedders should be exposed via public API of //content (rather than hiding such generally useful things inside //content/shell). OTOH, I am not really a //content/OWNER, so take what I say with a grain of salt :-) |
||||
►
Sign in to add a comment |
||||
Comment 1 by michae...@chromium.org
, Feb 16 2017