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

Unified Diff: components/html_viewer/layout_test_html_viewer.cc

Issue 1308973005: html_viewer/web_view: An app for running layout-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix-win-build Created 5 years, 3 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: components/html_viewer/layout_test_html_viewer.cc
diff --git a/components/html_viewer/layout_test_html_viewer.cc b/components/html_viewer/layout_test_html_viewer.cc
index c015a3dc363606ec1dadfc2b2ec1daf35cf6a8b9..d3c660a96e0d47e4a716e0a7877f3d7b745e3bba 100644
--- a/components/html_viewer/layout_test_html_viewer.cc
+++ b/components/html_viewer/layout_test_html_viewer.cc
@@ -6,6 +6,7 @@
#include "components/html_viewer/global_state.h"
#include "components/html_viewer/layout_test_content_handler_impl.h"
+#include "components/html_viewer/public/interfaces/layout_test_runner.mojom.h"
#include "components/test_runner/web_test_interfaces.h"
namespace html_viewer {
@@ -23,6 +24,17 @@ void LayoutTestHTMLViewer::Initialize(mojo::ApplicationImpl* app) {
test_interfaces_->ResetAll();
test_delegate_.set_test_interfaces(test_interfaces_.get());
test_interfaces_->SetDelegate(&test_delegate_);
+ test_interfaces_->set_termination_callback(
+ base::Bind(&LayoutTestHTMLViewer::TestFinished, base::Unretained(this)));
+}
+
+void LayoutTestHTMLViewer::TestFinished() {
+ LayoutTestRunnerPtr test_runner_ptr;
+
+ mojo::URLRequestPtr request(mojo::URLRequest::New());
+ request->url = mojo::String::From("mojo:test_runner");
+ app()->ConnectToService(request.Pass(), &test_runner_ptr);
+ test_runner_ptr->TestFinished();
}
void LayoutTestHTMLViewer::Create(

Powered by Google App Engine
This is Rietveld 408576698