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

Unified Diff: components/html_viewer/layout_test_html_viewer.cc

Issue 1218323002: Hook up test runner to new layout_test_html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 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: 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
new file mode 100644
index 0000000000000000000000000000000000000000..c3ffc3b3ce5601d72dba43c20314d42d5d3560c0
--- /dev/null
+++ b/components/html_viewer/layout_test_html_viewer.cc
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/html_viewer/layout_test_html_viewer.h"
+
+#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"
+
+
jam 2015/07/09 16:48:27 nit: extra line
jochen (gone - plz use gerrit) 2015/07/10 07:53:43 done
+namespace html_viewer {
+
+LayoutTestHTMLViewer::LayoutTestHTMLViewer() {
+}
+
+LayoutTestHTMLViewer::~LayoutTestHTMLViewer() {
+}
+
+void LayoutTestHTMLViewer::Initialize(mojo::ApplicationImpl* app) {
+ HTMLViewer::Initialize(app);
+ global_state()->InitIfNecessary(gfx::Size(800, 600), 1.f);
+ test_interfaces_.reset(new test_runner::WebTestInterfaces);
+ test_interfaces_->ResetAll();
+ test_delegate_.set_test_interfaces(test_interfaces_.get());
+ test_interfaces_->SetDelegate(&test_delegate_);
+}
+
+void LayoutTestHTMLViewer::Create(
+ mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::ContentHandler> request) {
+ new LayoutTestContentHandlerImpl(global_state(), app(), request.Pass(),
+ test_interfaces_.get(),
+ &test_delegate_);
+}
+
+} // namespace html_viewer

Powered by Google App Engine
This is Rietveld 408576698