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 @@
'../components/components.gyp:breakpad_host',
],
}],
['debug_devtools==1', {
'defines': [
'DEBUG_DEVTOOLS=1',
],
}],
['(OS=="linux" or OS=="android") and use_allocator!="none"', {
'dependencies': [
# This is needed by content/app/content_main_runner.cc
......
......@@ -176,6 +176,8 @@ static_library("content_shell_lib") {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
"//third_party/WebKit/public:debug_devtools",
]
defines = [ "CONTENT_SHELL_VERSION=\"$content_shell_version\"" ]
......
......@@ -53,11 +53,14 @@ GURL LayoutTestDevToolsFrontend::GetDevToolsPathAsURL(
dir_exe.AppendASCII("resources/inspector/inspector.html");
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())
result = GURL(base::StringPrintf("%s?settings=%s&experiments=true",
result.spec().c_str(),
settings.c_str()));
return result;
url_string += "&settings=" + settings;
return GURL(url_string);
}
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