| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 #include "content/shell/test_runner/pixel_dump.h" | 54 #include "content/shell/test_runner/pixel_dump.h" |
| 55 #include "content/shell/test_runner/web_test_interfaces.h" | 55 #include "content/shell/test_runner/web_test_interfaces.h" |
| 56 #include "content/shell/test_runner/web_test_runner.h" | 56 #include "content/shell/test_runner/web_test_runner.h" |
| 57 #include "content/shell/test_runner/web_view_test_proxy.h" | 57 #include "content/shell/test_runner/web_view_test_proxy.h" |
| 58 #include "media/base/audio_capturer_source.h" | 58 #include "media/base/audio_capturer_source.h" |
| 59 #include "media/base/audio_parameters.h" | 59 #include "media/base/audio_parameters.h" |
| 60 #include "media/capture/video_capturer_source.h" | 60 #include "media/capture/video_capturer_source.h" |
| 61 #include "media/media_features.h" | 61 #include "media/media_features.h" |
| 62 #include "net/base/filename_util.h" | 62 #include "net/base/filename_util.h" |
| 63 #include "net/base/net_errors.h" | 63 #include "net/base/net_errors.h" |
| 64 #include "services/service_manager/public/cpp/binder_registry.h" |
| 64 #include "services/service_manager/public/cpp/connector.h" | 65 #include "services/service_manager/public/cpp/connector.h" |
| 65 #include "services/service_manager/public/cpp/interface_registry.h" | |
| 66 #include "skia/ext/platform_canvas.h" | 66 #include "skia/ext/platform_canvas.h" |
| 67 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 67 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
| 68 #include "third_party/WebKit/public/platform/Platform.h" | 68 #include "third_party/WebKit/public/platform/Platform.h" |
| 69 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 69 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 70 #include "third_party/WebKit/public/platform/WebPoint.h" | 70 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 71 #include "third_party/WebKit/public/platform/WebRect.h" | 71 #include "third_party/WebKit/public/platform/WebRect.h" |
| 72 #include "third_party/WebKit/public/platform/WebSize.h" | 72 #include "third_party/WebKit/public/platform/WebSize.h" |
| 73 #include "third_party/WebKit/public/platform/WebString.h" | 73 #include "third_party/WebKit/public/platform/WebString.h" |
| 74 #include "third_party/WebKit/public/platform/WebThread.h" | 74 #include "third_party/WebKit/public/platform/WebThread.h" |
| 75 #include "third_party/WebKit/public/platform/WebTraceLocation.h" | 75 #include "third_party/WebKit/public/platform/WebTraceLocation.h" |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 | 726 |
| 727 cc::SharedBitmapManager* BlinkTestRunner::GetSharedBitmapManager() { | 727 cc::SharedBitmapManager* BlinkTestRunner::GetSharedBitmapManager() { |
| 728 return RenderThread::Get()->GetSharedBitmapManager(); | 728 return RenderThread::Get()->GetSharedBitmapManager(); |
| 729 } | 729 } |
| 730 | 730 |
| 731 void BlinkTestRunner::DispatchBeforeInstallPromptEvent( | 731 void BlinkTestRunner::DispatchBeforeInstallPromptEvent( |
| 732 const std::vector<std::string>& event_platforms, | 732 const std::vector<std::string>& event_platforms, |
| 733 const base::Callback<void(bool)>& callback) { | 733 const base::Callback<void(bool)>& callback) { |
| 734 app_banner_service_.reset(new test_runner::AppBannerService()); | 734 app_banner_service_.reset(new test_runner::AppBannerService()); |
| 735 | 735 |
| 736 service_manager::InterfaceRegistry::TestApi test_api( | 736 service_manager::BinderRegistry* registry = |
| 737 render_view()->GetMainRenderFrame()->GetInterfaceRegistry()); | 737 render_view()->GetMainRenderFrame()->GetInterfaceRegistry(); |
| 738 test_api.GetLocalInterface( | 738 blink::mojom::AppBannerControllerRequest request = |
| 739 mojo::MakeRequest(&app_banner_service_->controller())); | 739 mojo::MakeRequest(&app_banner_service_->controller()); |
| 740 | 740 registry->BindInterface(service_manager::Identity(), |
| 741 blink::mojom::AppBannerController::Name_, |
| 742 request.PassMessagePipe()); |
| 741 app_banner_service_->SendBannerPromptRequest(event_platforms, callback); | 743 app_banner_service_->SendBannerPromptRequest(event_platforms, callback); |
| 742 } | 744 } |
| 743 | 745 |
| 744 void BlinkTestRunner::ResolveBeforeInstallPromptPromise( | 746 void BlinkTestRunner::ResolveBeforeInstallPromptPromise( |
| 745 const std::string& platform) { | 747 const std::string& platform) { |
| 746 if (app_banner_service_) { | 748 if (app_banner_service_) { |
| 747 app_banner_service_->ResolvePromise(platform); | 749 app_banner_service_->ResolvePromise(platform); |
| 748 app_banner_service_.reset(nullptr); | 750 app_banner_service_.reset(nullptr); |
| 749 } | 751 } |
| 750 } | 752 } |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 void BlinkTestRunner::ReportLeakDetectionResult( | 1059 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1058 const LeakDetectionResult& report) { | 1060 const LeakDetectionResult& report) { |
| 1059 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1061 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1060 } | 1062 } |
| 1061 | 1063 |
| 1062 void BlinkTestRunner::OnDestruct() { | 1064 void BlinkTestRunner::OnDestruct() { |
| 1063 delete this; | 1065 delete this; |
| 1064 } | 1066 } |
| 1065 | 1067 |
| 1066 } // namespace content | 1068 } // namespace content |
| OLD | NEW |