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

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: nit Created 4 years, 1 month 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..d12ddd0e2f21089c8ff4f3c9737db981d05ba866 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::kCustomDevToolsFrontend)) {
+ dev_tools_path = base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
+ switches::kCustomDevToolsFrontend);
+ } 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