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

Unified Diff: components/test_runner/test_interfaces.cc

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: clean diff 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: components/test_runner/test_interfaces.cc
diff --git a/components/test_runner/test_interfaces.cc b/components/test_runner/test_interfaces.cc
index e5f0c0762b1bf9dc8272b4d79616ec75425ba7b2..9bf27039948c69e3d4a15e72a8e2102528a8f7a9 100644
--- a/components/test_runner/test_interfaces.cc
+++ b/components/test_runner/test_interfaces.cc
@@ -105,6 +105,17 @@ void TestInterfaces::ConfigureForTestWithURL(const blink::WebURL& test_url,
base::JSONWriter::Write(settings, &settings_string);
test_runner_->ShowDevTools(settings_string, std::string());
}
+ if (spec.find("/inspector-unit/") != std::string::npos &&
+ spec.find("spec.js") != std::string::npos) {
+ test_runner_->WaitUntilDone();
+ std::string inspector_unit_path = "/inspector-unit/";
+ std::string test_path = spec.substr(spec.find(inspector_unit_path) +
+ inspector_unit_path.length());
+ blink::WebURL test_shell_url = blink::WebURL(GURL(test_url).Resolve(
+ "/inspector-unit/resources/inspector-unit-test-shell.html?test=" +
+ test_path));
+ test_runner_->LoadURLForMainFrame(test_shell_url);
+ }
if (spec.find("/viewsource/") != std::string::npos) {
test_runner_->setShouldEnableViewSource(true);
test_runner_->setShouldGeneratePixelResults(false);

Powered by Google App Engine
This is Rietveld 408576698