summaryrefslogtreecommitdiffstats
path: root/content/shell/browser
diff options
context:
space:
mode:
authorlukasza <lukasza@chromium.org>2016-03-15 14:58:50 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-15 22:00:33 +0000
commit756abda6b173d7b698bf43a0726e43eaab8c03dd (patch)
tree0a5d5b744e536167cab9e3536e69cbf6e16e25bf /content/shell/browser
parent03ad6f33b5e9d4f3b22cfd6cda5fab9002fe52d6 (diff)
downloadchromium_src-756abda6b173d7b698bf43a0726e43eaab8c03dd.zip
chromium_src-756abda6b173d7b698bf43a0726e43eaab8c03dd.tar.gz
chromium_src-756abda6b173d7b698bf43a0726e43eaab8c03dd.tar.bz2
Make kExposeInternalsForTesting usable again for interactive content_shell.
In https://crrev.com/1763113002 I've tried to separate layout-test-specific cmdline switches into a separate header file and handle some of them under LayoutTestContentBrowserClient::AppendExtraCommandLineSwitches rather than ShellContentBrowserClient::AppendExtraCommandLineSwitches. This was wrong - this meant that devs cannot pass these switches when debugging via content_shell running in interactive / non-layout-test mode. So - the current CL undoes part of https://crrev.com/1763113002 and restores processing of some of the switches back to ShellContentBrowserClient: - kExposeInternalsForTesting - this is useful for debugging layout tests (see https://crbug.com/594566). For now it is okay to leave propagation of the following switches in LayoutTestContentBrowserClient (because moving them in https://crrev.com/1763113002 was not a regression as explained below): - kStableReleaseMode - it only has effect if used together with --run-layout-test switch (i.e. see how ShellMainDelegate::BasicStartupComplete first checks switches::kRunLayoutTest before checking switches::kStableReleaseMode in a nested if). - kEnableLeakDetection only affects BlinkTestController and LayoutTestContentBrowserClient so it won't have any effect without --run-layout-test switch. - kEnableFontAntialiasing and kAlwaysUseComplexText only affects LayoutTestContentBrowserClient and LayoutTestRenderProcessObserver so it won't have any effect without --run-layout-test switch. BUG=594566 Review URL: https://codereview.chromium.org/1799923002 Cr-Commit-Position: refs/heads/master@{#381330}
Diffstat (limited to 'content/shell/browser')
-rw-r--r--content/shell/browser/layout_test/layout_test_content_browser_client.cc4
-rw-r--r--content/shell/browser/shell_content_browser_client.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
index 8626064..cc66507 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
@@ -98,10 +98,6 @@ void LayoutTestContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->AppendSwitch(switches::kEnableFontAntialiasing);
}
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kExposeInternalsForTesting)) {
- command_line->AppendSwitch(switches::kExposeInternalsForTesting);
- }
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kStableReleaseMode)) {
command_line->AppendSwitch(switches::kStableReleaseMode);
}
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 4fe9084..dd9840a 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -234,6 +234,10 @@ void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line,
int child_process_id) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kExposeInternalsForTesting)) {
+ command_line->AppendSwitch(switches::kExposeInternalsForTesting);
+ }
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableCrashReporter)) {
command_line->AppendSwitch(switches::kEnableCrashReporter);
}