Commit 6adbc801 authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

[DevTools] use debug_frontend flag in content_shell for tests

Without this flag InspectorFrontendHost can call callbacks while devtools on pause. It makes debugging of layout tests useless.

R=dgozman@chromium.org, pfeldman@chromium.org

Review URL: https://codereview.chromium.org/1639973003

Cr-Commit-Position: refs/heads/master@{#371919}
parent 70aa1e82
...@@ -281,6 +281,11 @@ ...@@ -281,6 +281,11 @@
'../components/components.gyp:breakpad_host', '../components/components.gyp:breakpad_host',
], ],
}], }],
['debug_devtools==1', {
'defines': [
'DEBUG_DEVTOOLS=1',
],
}],
['(OS=="linux" or OS=="android") and use_allocator!="none"', { ['(OS=="linux" or OS=="android") and use_allocator!="none"', {
'dependencies': [ 'dependencies': [
# This is needed by content/app/content_main_runner.cc # This is needed by content/app/content_main_runner.cc
......
...@@ -176,6 +176,8 @@ static_library("content_shell_lib") { ...@@ -176,6 +176,8 @@ static_library("content_shell_lib") {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations. # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning", "//build/config/compiler:no_size_t_to_int_warning",
"//third_party/WebKit/public:debug_devtools",
] ]
defines = [ "CONTENT_SHELL_VERSION=\"$content_shell_version\"" ] defines = [ "CONTENT_SHELL_VERSION=\"$content_shell_version\"" ]
......
...@@ -53,11 +53,14 @@ GURL LayoutTestDevToolsFrontend::GetDevToolsPathAsURL( ...@@ -53,11 +53,14 @@ GURL LayoutTestDevToolsFrontend::GetDevToolsPathAsURL(
dir_exe.AppendASCII("resources/inspector/inspector.html"); dir_exe.AppendASCII("resources/inspector/inspector.html");
GURL result = net::FilePathToFileURL(dev_tools_path); GURL result = net::FilePathToFileURL(dev_tools_path);
std::string url_string =
base::StringPrintf("%s?experiments=true", result.spec().c_str());
#if defined(DEBUG_DEVTOOLS)
url_string += "&debugFrontend=true";
#endif // defined(DEBUG_DEVTOOLS)
if (!settings.empty()) if (!settings.empty())
result = GURL(base::StringPrintf("%s?settings=%s&experiments=true", url_string += "&settings=" + settings;
result.spec().c_str(), return GURL(url_string);
settings.c_str()));
return result;
} }
void LayoutTestDevToolsFrontend::ReuseFrontend(const std::string& settings, void LayoutTestDevToolsFrontend::ReuseFrontend(const std::string& settings,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment