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

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: Moved type definition out of externs Created 4 years 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..917a876455bfb260dea28c70cc07cda98256ee5c 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,17 @@ GURL LayoutTestDevToolsFrontend::GetDevToolsPathAsURL(
return GURL(url_string);
}
+// static.
+GURL LayoutTestDevToolsFrontend::MapJSTestURL(const GURL& test_url) {
+ std::string url_string = GetDevToolsPathAsURL(std::string()).spec();
+ std::string inspector_file_name = "inspector.html";
+ size_t start_position = url_string.find(inspector_file_name);
+ url_string.replace(start_position, inspector_file_name.length(),
+ "unit_test_runner.html");
+ url_string += "&test=" + test_url.spec();
+ return GURL(url_string);
+}
+
void LayoutTestDevToolsFrontend::ReuseFrontend(const std::string& settings,
const std::string frontend_url) {
DisconnectFromTarget();

Powered by Google App Engine
This is Rietveld 408576698