OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/renderer/layout_test/blink_test_runner.h" | 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <clocale> | 10 #include <clocale> |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 } | 706 } |
707 | 707 |
708 void BlinkTestRunner::DispatchBeforeInstallPromptEvent( | 708 void BlinkTestRunner::DispatchBeforeInstallPromptEvent( |
709 const std::vector<std::string>& event_platforms, | 709 const std::vector<std::string>& event_platforms, |
710 const base::Callback<void(bool)>& callback) { | 710 const base::Callback<void(bool)>& callback) { |
711 app_banner_service_.reset(new test_runner::AppBannerService()); | 711 app_banner_service_.reset(new test_runner::AppBannerService()); |
712 | 712 |
713 service_manager::InterfaceRegistry::TestApi test_api( | 713 service_manager::InterfaceRegistry::TestApi test_api( |
714 render_view()->GetMainRenderFrame()->GetInterfaceRegistry()); | 714 render_view()->GetMainRenderFrame()->GetInterfaceRegistry()); |
715 test_api.GetLocalInterface( | 715 test_api.GetLocalInterface( |
716 mojo::GetProxy(&app_banner_service_->controller())); | 716 mojo::MakeRequest(&app_banner_service_->controller())); |
717 | 717 |
718 app_banner_service_->SendBannerPromptRequest(event_platforms, callback); | 718 app_banner_service_->SendBannerPromptRequest(event_platforms, callback); |
719 } | 719 } |
720 | 720 |
721 void BlinkTestRunner::ResolveBeforeInstallPromptPromise( | 721 void BlinkTestRunner::ResolveBeforeInstallPromptPromise( |
722 const std::string& platform) { | 722 const std::string& platform) { |
723 if (app_banner_service_) { | 723 if (app_banner_service_) { |
724 app_banner_service_->ResolvePromise(platform); | 724 app_banner_service_->ResolvePromise(platform); |
725 app_banner_service_.reset(nullptr); | 725 app_banner_service_.reset(nullptr); |
726 } | 726 } |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 void BlinkTestRunner::CaptureDumpComplete() { | 935 void BlinkTestRunner::CaptureDumpComplete() { |
936 render_view()->GetWebView()->mainFrame()->stopLoading(); | 936 render_view()->GetWebView()->mainFrame()->stopLoading(); |
937 | 937 |
938 Send(new ShellViewHostMsg_TestFinished(routing_id())); | 938 Send(new ShellViewHostMsg_TestFinished(routing_id())); |
939 } | 939 } |
940 | 940 |
941 mojom::LayoutTestBluetoothFakeAdapterSetter& | 941 mojom::LayoutTestBluetoothFakeAdapterSetter& |
942 BlinkTestRunner::GetBluetoothFakeAdapterSetter() { | 942 BlinkTestRunner::GetBluetoothFakeAdapterSetter() { |
943 if (!bluetooth_fake_adapter_setter_) { | 943 if (!bluetooth_fake_adapter_setter_) { |
944 RenderThread::Get()->GetRemoteInterfaces()->GetInterface( | 944 RenderThread::Get()->GetRemoteInterfaces()->GetInterface( |
945 mojo::GetProxy(&bluetooth_fake_adapter_setter_)); | 945 mojo::MakeRequest(&bluetooth_fake_adapter_setter_)); |
946 } | 946 } |
947 return *bluetooth_fake_adapter_setter_; | 947 return *bluetooth_fake_adapter_setter_; |
948 } | 948 } |
949 | 949 |
950 void BlinkTestRunner::OnSetupSecondaryRenderer() { | 950 void BlinkTestRunner::OnSetupSecondaryRenderer() { |
951 DCHECK(!is_main_window_); | 951 DCHECK(!is_main_window_); |
952 | 952 |
953 test_runner::WebTestInterfaces* interfaces = | 953 test_runner::WebTestInterfaces* interfaces = |
954 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); | 954 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); |
955 interfaces->SetTestIsRunning(true); | 955 interfaces->SetTestIsRunning(true); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 void BlinkTestRunner::ReportLeakDetectionResult( | 1031 void BlinkTestRunner::ReportLeakDetectionResult( |
1032 const LeakDetectionResult& report) { | 1032 const LeakDetectionResult& report) { |
1033 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1033 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1034 } | 1034 } |
1035 | 1035 |
1036 void BlinkTestRunner::OnDestruct() { | 1036 void BlinkTestRunner::OnDestruct() { |
1037 delete this; | 1037 delete this; |
1038 } | 1038 } |
1039 | 1039 |
1040 } // namespace content | 1040 } // namespace content |
OLD | NEW |