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

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: tot/merge 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
« no previous file with comments | « components/html_viewer/layout_test_html_viewer.h ('k') | components/html_viewer/web_test_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c932fdf73edd1d1cab5d2f56087f08e35922fd22 100644
--- a/components/html_viewer/layout_test_html_viewer.cc
+++ b/components/html_viewer/layout_test_html_viewer.cc
@@ -7,6 +7,7 @@
#include "components/html_viewer/global_state.h"
#include "components/html_viewer/layout_test_content_handler_impl.h"
#include "components/test_runner/web_test_interfaces.h"
+#include "components/web_view/test_runner/public/interfaces/layout_test_runner.mojom.h"
namespace html_viewer {
@@ -22,9 +23,20 @@ void LayoutTestHTMLViewer::Initialize(mojo::ApplicationImpl* app) {
test_interfaces_.reset(new test_runner::WebTestInterfaces);
test_interfaces_->ResetAll();
test_delegate_.set_test_interfaces(test_interfaces_.get());
+ test_delegate_.set_completion_callback(
+ base::Bind(&LayoutTestHTMLViewer::TestFinished, base::Unretained(this)));
test_interfaces_->SetDelegate(&test_delegate_);
}
+void LayoutTestHTMLViewer::TestFinished() {
+ web_view::LayoutTestRunnerPtr test_runner_ptr;
+
+ mojo::URLRequestPtr request(mojo::URLRequest::New());
+ request->url = mojo::String::From("mojo:web_view_test_runner");
+ app()->ConnectToService(request.Pass(), &test_runner_ptr);
+ test_runner_ptr->TestFinished();
+}
+
void LayoutTestHTMLViewer::Create(
mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<mojo::ContentHandler> request) {
« no previous file with comments | « components/html_viewer/layout_test_html_viewer.h ('k') | components/html_viewer/web_test_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698