| 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 | 741 |
| 742 void BlinkTestRunner::ResolveBeforeInstallPromptPromise( | 742 void BlinkTestRunner::ResolveBeforeInstallPromptPromise( |
| 743 const std::string& platform) { | 743 const std::string& platform) { |
| 744 if (app_banner_service_) { | 744 if (app_banner_service_) { |
| 745 app_banner_service_->ResolvePromise(platform); | 745 app_banner_service_->ResolvePromise(platform); |
| 746 app_banner_service_.reset(nullptr); | 746 app_banner_service_.reset(nullptr); |
| 747 } | 747 } |
| 748 } | 748 } |
| 749 | 749 |
| 750 blink::WebPlugin* BlinkTestRunner::CreatePluginPlaceholder( | 750 blink::WebPlugin* BlinkTestRunner::CreatePluginPlaceholder( |
| 751 blink::WebLocalFrame* frame, const blink::WebPluginParams& params) { | 751 const blink::WebPluginParams& params) { |
| 752 if (params.mime_type != "application/x-plugin-placeholder-test") | 752 if (params.mime_type != "application/x-plugin-placeholder-test") |
| 753 return nullptr; | 753 return nullptr; |
| 754 | 754 |
| 755 plugins::PluginPlaceholder* placeholder = | 755 plugins::PluginPlaceholder* placeholder = new plugins::PluginPlaceholder( |
| 756 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame, | 756 render_view()->GetMainRenderFrame(), params, "<div>Test content</div>"); |
| 757 params, "<div>Test content</div>"); | |
| 758 return placeholder->plugin(); | 757 return placeholder->plugin(); |
| 759 } | 758 } |
| 760 | 759 |
| 761 float BlinkTestRunner::GetDeviceScaleFactor() const { | 760 float BlinkTestRunner::GetDeviceScaleFactor() const { |
| 762 return render_view()->GetDeviceScaleFactor(); | 761 return render_view()->GetDeviceScaleFactor(); |
| 763 } | 762 } |
| 764 | 763 |
| 765 void BlinkTestRunner::RunIdleTasks(const base::Closure& callback) { | 764 void BlinkTestRunner::RunIdleTasks(const base::Closure& callback) { |
| 766 SchedulerRunIdleTasks(callback); | 765 SchedulerRunIdleTasks(callback); |
| 767 } | 766 } |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 void BlinkTestRunner::ReportLeakDetectionResult( | 1062 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1064 const LeakDetectionResult& report) { | 1063 const LeakDetectionResult& report) { |
| 1065 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1064 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1066 } | 1065 } |
| 1067 | 1066 |
| 1068 void BlinkTestRunner::OnDestruct() { | 1067 void BlinkTestRunner::OnDestruct() { |
| 1069 delete this; | 1068 delete this; |
| 1070 } | 1069 } |
| 1071 | 1070 |
| 1072 } // namespace content | 1071 } // namespace content |
| OLD | NEW |