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

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

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: address CL feedback 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
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 d12ddd0e2f21089c8ff4f3c9737db981d05ba866..c80ec130507a4e4e3b24c4717cf5f13c05c7ab59 100644
--- a/content/shell/browser/layout_test/layout_test_devtools_frontend.cc
+++ b/content/shell/browser/layout_test/layout_test_devtools_frontend.cc
@@ -73,6 +73,18 @@ GURL LayoutTestDevToolsFrontend::GetDevToolsPathAsURL(
return GURL(url_string);
}
+// static.
+GURL LayoutTestDevToolsFrontend::MapJSTestURL(const GURL& test_url) {
+ std::string test_url_spec = test_url.spec();
+ std::string inspector_unit_path = "/inspector-unit/";
+ if (test_url_spec.find(inspector_unit_path) == std::string::npos)
+ return test_url;
+ std::string test_path = test_url_spec.substr(
+ test_url_spec.find(inspector_unit_path) + inspector_unit_path.length());
+ return test_url.Resolve(
+ "/inspector-unit/inspector-unit-test-shell.html?test=" + test_path);
+}
+
void LayoutTestDevToolsFrontend::ReuseFrontend(const std::string& settings,
const std::string frontend_url) {
DisconnectFromTarget();

Powered by Google App Engine
This is Rietveld 408576698