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

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

Issue 2742623002: DevTools: improve test infrastructure w/ devtools driving the test (Closed)
Patch Set: fixup Created 3 years, 9 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_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 ac62b4a8c4bfd8d4f72fb7a325cdca5a312a20c6..5e0856aa63101c16a613e48473cb7c3f036a3328 100644
--- a/content/shell/browser/layout_test/layout_test_devtools_frontend.cc
+++ b/content/shell/browser/layout_test/layout_test_devtools_frontend.cc
@@ -21,6 +21,21 @@
namespace content {
// static
+LayoutTestDevToolsFrontend*
+LayoutTestDevToolsFrontend::CreateDevToolsMainWindow(
+ const Shell& inspected_window) {
+ Shell* devtools_shell = Shell::CreateNewWindow(
+ inspected_window.web_contents()->GetBrowserContext(), GURL(), NULL,
+ gfx::Size());
+ LayoutTestDevToolsFrontend* devtools_frontend =
+ new LayoutTestDevToolsFrontend(devtools_shell,
+ inspected_window.web_contents());
+ devtools_frontend->Activate();
+ devtools_frontend->Focus();
+ return devtools_frontend;
+}
+
+// static
LayoutTestDevToolsFrontend* LayoutTestDevToolsFrontend::Show(
WebContents* inspected_contents,
const std::string& settings,
@@ -74,7 +89,18 @@ GURL LayoutTestDevToolsFrontend::GetDevToolsPathAsURL(
}
// static.
-GURL LayoutTestDevToolsFrontend::MapJSTestURL(const GURL& test_url) {
+GURL LayoutTestDevToolsFrontend::MapIntegrationTestURL(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(),
+ "integration_test_runner.html");
+ url_string += "&test=" + test_url.spec();
+ return GURL(url_string);
+}
+
+// static.
+GURL LayoutTestDevToolsFrontend::MapUnitTestURL(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);
« no previous file with comments | « content/shell/browser/layout_test/layout_test_devtools_frontend.h ('k') | content/shell/test_runner/test_interfaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698