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

Unified Diff: mandoline/ui/test_runner/test_runner_application_delegate.h

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: mandoline/ui/test_runner/test_runner_application_delegate.h
diff --git a/mandoline/ui/test_runner/test_runner_application_delegate.h b/mandoline/ui/test_runner/test_runner_application_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..f263dc616d585c364bb2c1b317d285b382b89575
--- /dev/null
+++ b/mandoline/ui/test_runner/test_runner_application_delegate.h
@@ -0,0 +1,60 @@
+// 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.
+
+#ifndef MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_
+#define MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_
+
+#include "base/command_line.h"
+#include "components/html_viewer/public/interfaces/layout_test_runner.mojom.h"
+#include "mandoline/ui/phone_ui/phone_browser_application_delegate.h"
+
+namespace mojo {
+class View;
+}
+
+namespace mandoline {
+
+class TestRunnerApplicationDelegate
+ : public PhoneBrowserApplicationDelegate,
+ public html_viewer::LayoutTestRunner,
+ public mojo::InterfaceFactory<html_viewer::LayoutTestRunner> {
+ public:
+ TestRunnerApplicationDelegate();
+ ~TestRunnerApplicationDelegate() override;
+
+ private:
+ void Terminate();
+
+ // PhoneBrowserApplicationDelegate:
+ bool ShouldLaunchURLOnInitialize() const override;
+ gfx::Size GetViewportSize() const override;
+
+ // mojo::ViewTreeDelegate:
+ void OnEmbed(mojo::View* root) override;
+
+ // mojo::ApplicationDelegate:
+ bool ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) override;
+
+ // html_viewer::LayoutTestRunner:
+ void TestFinished() override;
+
+ using PhoneBrowserApplicationDelegate::Create;
+
+ // mojo::InterfaceFactory<html_viewer::LayoutTestRunner>:
+ void Create(
+ mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<html_viewer::LayoutTestRunner> request) override;
+
+ base::CommandLine::StringVector cmdline_args_;
+ size_t cmdline_position_ = 0;
+
+ mojo::WeakBindingSet<html_viewer::LayoutTestRunner> layout_test_runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestRunnerApplicationDelegate);
+};
+
+} // namespace mandoline
+
+#endif // MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698