Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(723)

Unified Diff: content/shell/browser/layout_test/layout_test_devtools_frontend.cc

Issue 2448143004: DevTools: add custom-devtools-frontend flag for content shell layout tests (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/shell/common/layout_test/layout_test_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | content/shell/common/layout_test/layout_test_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698