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

Side by Side Diff: components/html_viewer/layout_test_html_viewer.cc

Issue 1455833005: Convert ConnectToApplication to take a params class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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/html_viewer/layout_test_html_viewer.h" 5 #include "components/html_viewer/layout_test_html_viewer.h"
6 6
7 #include "components/html_viewer/global_state.h" 7 #include "components/html_viewer/global_state.h"
8 #include "components/html_viewer/layout_test_content_handler_impl.h" 8 #include "components/html_viewer/layout_test_content_handler_impl.h"
9 #include "components/test_runner/web_test_interfaces.h" 9 #include "components/test_runner/web_test_interfaces.h"
10 #include "components/web_view/test_runner/public/interfaces/layout_test_runner.m ojom.h" 10 #include "components/web_view/test_runner/public/interfaces/layout_test_runner.m ojom.h"
(...skipping 19 matching lines...) Expand all
30 30
31 // Always expose GC to layout tests. 31 // Always expose GC to layout tests.
32 std::string flags("--expose-gc"); 32 std::string flags("--expose-gc");
33 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); 33 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size()));
34 } 34 }
35 35
36 void LayoutTestHTMLViewer::TestFinished() { 36 void LayoutTestHTMLViewer::TestFinished() {
37 test_interfaces_->ResetAll(); 37 test_interfaces_->ResetAll();
38 38
39 web_view::LayoutTestRunnerPtr test_runner_ptr; 39 web_view::LayoutTestRunnerPtr test_runner_ptr;
40 mojo::URLRequestPtr request(mojo::URLRequest::New()); 40 app()->ConnectToService("mojo:web_view_test_runner", &test_runner_ptr);
41 request->url = mojo::String::From("mojo:web_view_test_runner");
42 app()->ConnectToService(request.Pass(), &test_runner_ptr);
43 test_runner_ptr->TestFinished(); 41 test_runner_ptr->TestFinished();
44 } 42 }
45 43
46 void LayoutTestHTMLViewer::Create( 44 void LayoutTestHTMLViewer::Create(
47 mojo::ApplicationConnection* connection, 45 mojo::ApplicationConnection* connection,
48 mojo::InterfaceRequest<mojo::ContentHandler> request) { 46 mojo::InterfaceRequest<mojo::ContentHandler> request) {
49 new LayoutTestContentHandlerImpl(global_state(), app(), request.Pass(), 47 new LayoutTestContentHandlerImpl(global_state(), app(), request.Pass(),
50 test_interfaces_.get(), 48 test_interfaces_.get(),
51 &test_delegate_); 49 &test_delegate_);
52 } 50 }
53 51
54 } // namespace html_viewer 52 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/html_widget.cc ('k') | components/html_viewer/stats_collection_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698