| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/web_view/test_runner/test_runner_application_delegate.h" | 5 #include "components/web_view/test_runner/test_runner_application_delegate.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 //////////////////////////////////////////////////////////////////////////////// | 116 //////////////////////////////////////////////////////////////////////////////// |
| 117 // mojom::WebViewClient implementation: | 117 // mojom::WebViewClient implementation: |
| 118 | 118 |
| 119 void TestRunnerApplicationDelegate::TopLevelNavigate( | 119 void TestRunnerApplicationDelegate::TopLevelNavigate( |
| 120 mojo::URLRequestPtr request) { | 120 mojo::URLRequestPtr request) { |
| 121 web_view_->web_view()->LoadRequest(request.Pass()); | 121 web_view_->web_view()->LoadRequest(request.Pass()); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void TestRunnerApplicationDelegate::LoadingStateChanged(bool is_loading) {} | 124 void TestRunnerApplicationDelegate::LoadingStateChanged(bool is_loading) {} |
| 125 void TestRunnerApplicationDelegate::ProgressChanged(double progress) {} | 125 void TestRunnerApplicationDelegate::ProgressChanged(double progress) {} |
| 126 void TestRunnerApplicationDelegate::BackForwardChanged( |
| 127 mojom::ButtonState back_button, |
| 128 mojom::ButtonState forward_button) {} |
| 126 void TestRunnerApplicationDelegate::TitleChanged(const mojo::String& title) {} | 129 void TestRunnerApplicationDelegate::TitleChanged(const mojo::String& title) {} |
| 127 | 130 |
| 128 //////////////////////////////////////////////////////////////////////////////// | 131 //////////////////////////////////////////////////////////////////////////////// |
| 129 // LayoutTestRunner implementation: | 132 // LayoutTestRunner implementation: |
| 130 | 133 |
| 131 void TestRunnerApplicationDelegate::TestFinished() { | 134 void TestRunnerApplicationDelegate::TestFinished() { |
| 132 std::cout << "#EOF\n"; | 135 std::cout << "#EOF\n"; |
| 133 std::cout.flush(); | 136 std::cout.flush(); |
| 134 | 137 |
| 135 std::cerr << "#EOF\n"; | 138 std::cerr << "#EOF\n"; |
| 136 std::cerr.flush(); | 139 std::cerr.flush(); |
| 137 | 140 |
| 138 scoped_ptr<test_runner::TestInfo> test_info = test_extractor_->GetNextTest(); | 141 scoped_ptr<test_runner::TestInfo> test_info = test_extractor_->GetNextTest(); |
| 139 if (test_info) | 142 if (test_info) |
| 140 LaunchURL(test_info->url); | 143 LaunchURL(test_info->url); |
| 141 else | 144 else |
| 142 Terminate(); | 145 Terminate(); |
| 143 } | 146 } |
| 144 | 147 |
| 145 //////////////////////////////////////////////////////////////////////////////// | 148 //////////////////////////////////////////////////////////////////////////////// |
| 146 // mojo::InterfaceFactory<LayoutTestRunner> implementation: | 149 // mojo::InterfaceFactory<LayoutTestRunner> implementation: |
| 147 | 150 |
| 148 void TestRunnerApplicationDelegate::Create( | 151 void TestRunnerApplicationDelegate::Create( |
| 149 mojo::ApplicationConnection* connection, | 152 mojo::ApplicationConnection* connection, |
| 150 mojo::InterfaceRequest<web_view::LayoutTestRunner> request) { | 153 mojo::InterfaceRequest<web_view::LayoutTestRunner> request) { |
| 151 layout_test_runner_.AddBinding(this, request.Pass()); | 154 layout_test_runner_.AddBinding(this, request.Pass()); |
| 152 } | 155 } |
| 153 | 156 |
| 154 } // namespace web_view | 157 } // namespace web_view |
| OLD | NEW |