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

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

Issue 2837083003: DevTools: create test infrastructure so devtools drives the test (Closed)
Patch Set: fix Created 3 years, 6 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
Index: content/shell/browser/layout_test/layout_test_devtools_bindings.cc
diff --git a/content/shell/browser/layout_test/layout_test_devtools_bindings.cc b/content/shell/browser/layout_test/layout_test_devtools_bindings.cc
index 529e1f99f6e241e706ad27ba35435694a1cc132b..9e0f68d3f425416379f17174f6d991ebfd44d9a2 100644
--- a/content/shell/browser/layout_test/layout_test_devtools_bindings.cc
+++ b/content/shell/browser/layout_test/layout_test_devtools_bindings.cc
@@ -58,12 +58,24 @@ GURL LayoutTestDevToolsBindings::GetDevToolsPathAsURL(
}
// static.
-GURL LayoutTestDevToolsBindings::MapJSTestURL(const GURL& test_url) {
+GURL LayoutTestDevToolsBindings::MapIntegrationTestURL(const GURL& test_url) {
+ return MapJSTestURL(test_url, "integration_test_runner.html");
+}
+
+// static.
+GURL LayoutTestDevToolsBindings::MapUnitTestURL(const GURL& test_url) {
+ return MapJSTestURL(test_url, "unit_test_runner.html");
+}
+
+// static.
+GURL LayoutTestDevToolsBindings::MapJSTestURL(
+ const GURL& test_url,
+ const std::string& entry_filename) {
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");
+ entry_filename);
url_string += "&test=" + test_url.spec();
return GURL(url_string);
}
@@ -84,7 +96,6 @@ LayoutTestDevToolsBindings* LayoutTestDevToolsBindings::LoadDevTools(
ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
bindings->web_contents()->GetController().LoadURLWithParams(params);
bindings->web_contents()->Focus();
- bindings->CreateFrontendHost();
return bindings;
}

Powered by Google App Engine
This is Rietveld 408576698