Chromium Code Reviews| Index: content/shell/browser/layout_test/layout_test_devtools_frontend.cc |
| diff --git a/content/shell/browser/layout_test/layout_test_devtools_frontend.cc b/content/shell/browser/layout_test/layout_test_devtools_frontend.cc |
| index bd30d22ff34bbf9406ccb3696307d7659ffd6572..0f497bddf233ec819c0e8d65cec4b831dc05fe5c 100644 |
| --- a/content/shell/browser/layout_test/layout_test_devtools_frontend.cc |
| +++ b/content/shell/browser/layout_test/layout_test_devtools_frontend.cc |
| @@ -52,13 +52,20 @@ GURL LayoutTestDevToolsFrontend::GetDevToolsPathAsURL( |
| // We need to go up 3 directories to get to out/Release. |
| dir_exe = dir_exe.AppendASCII("../../.."); |
| #endif |
| + base::FilePath dev_tools_path; |
| bool is_debug_dev_tools = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kDebugDevTools); |
| - std::string folder = is_debug_dev_tools ? "debug/" : ""; |
| - base::FilePath dev_tools_path = |
| - dir_exe.AppendASCII("resources/inspector/" + folder + "inspector.html"); |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kDevToolsPath)) { |
|
dgozman
2016/11/02 00:54:11
Let's reuse --custom-devtools-frontend
chenwilliam
2016/11/04 22:04:25
Done.
|
| + dev_tools_path = base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
| + switches::kDevToolsPath); |
| + } else { |
| + std::string folder = is_debug_dev_tools ? "debug/" : ""; |
| + dev_tools_path = dir_exe.AppendASCII("resources/inspector/" + folder); |
| + } |
| - GURL result = net::FilePathToFileURL(dev_tools_path); |
| + GURL result = |
| + net::FilePathToFileURL(dev_tools_path.AppendASCII("inspector.html")); |
| std::string url_string = |
| base::StringPrintf("%s?experiments=true", result.spec().c_str()); |
| if (is_debug_dev_tools) |