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 | |
9 #include <algorithm> | 8 #include <algorithm> |
10 #include <clocale> | 9 #include <clocale> |
11 #include <cmath> | 10 #include <cmath> |
| 11 #include <utility> |
12 | 12 |
13 #include "base/base64.h" | 13 #include "base/base64.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/debug/debugger.h" | 16 #include "base/debug/debugger.h" |
17 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
18 #include "base/location.h" | 18 #include "base/location.h" |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/md5.h" | 20 #include "base/md5.h" |
21 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 using blink::WebVector; | 109 using blink::WebVector; |
110 using blink::WebView; | 110 using blink::WebView; |
111 | 111 |
112 namespace content { | 112 namespace content { |
113 | 113 |
114 namespace { | 114 namespace { |
115 | 115 |
116 class InvokeTaskHelper : public blink::WebTaskRunner::Task { | 116 class InvokeTaskHelper : public blink::WebTaskRunner::Task { |
117 public: | 117 public: |
118 InvokeTaskHelper(scoped_ptr<test_runner::WebTask> task) | 118 InvokeTaskHelper(scoped_ptr<test_runner::WebTask> task) |
119 : task_(task.Pass()) {} | 119 : task_(std::move(task)) {} |
120 | 120 |
121 // WebThread::Task implementation: | 121 // WebThread::Task implementation: |
122 void run() override { task_->run(); } | 122 void run() override { task_->run(); } |
123 | 123 |
124 private: | 124 private: |
125 scoped_ptr<test_runner::WebTask> task_; | 125 scoped_ptr<test_runner::WebTask> task_; |
126 }; | 126 }; |
127 | 127 |
128 class SyncNavigationStateVisitor : public RenderViewVisitor { | 128 class SyncNavigationStateVisitor : public RenderViewVisitor { |
129 public: | 129 public: |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 } | 282 } |
283 | 283 |
284 void BlinkTestRunner::SetEditCommand(const std::string& name, | 284 void BlinkTestRunner::SetEditCommand(const std::string& name, |
285 const std::string& value) { | 285 const std::string& value) { |
286 render_view()->SetEditCommandForNextKeyEvent(name, value); | 286 render_view()->SetEditCommandForNextKeyEvent(name, value); |
287 } | 287 } |
288 | 288 |
289 void BlinkTestRunner::SetGamepadProvider( | 289 void BlinkTestRunner::SetGamepadProvider( |
290 test_runner::GamepadController* controller) { | 290 test_runner::GamepadController* controller) { |
291 scoped_ptr<MockGamepadProvider> provider(new MockGamepadProvider(controller)); | 291 scoped_ptr<MockGamepadProvider> provider(new MockGamepadProvider(controller)); |
292 SetMockGamepadProvider(provider.Pass()); | 292 SetMockGamepadProvider(std::move(provider)); |
293 } | 293 } |
294 | 294 |
295 void BlinkTestRunner::SetDeviceLightData(const double data) { | 295 void BlinkTestRunner::SetDeviceLightData(const double data) { |
296 SetMockDeviceLightData(data); | 296 SetMockDeviceLightData(data); |
297 } | 297 } |
298 | 298 |
299 void BlinkTestRunner::SetDeviceMotionData(const WebDeviceMotionData& data) { | 299 void BlinkTestRunner::SetDeviceMotionData(const WebDeviceMotionData& data) { |
300 SetMockDeviceMotionData(data); | 300 SetMockDeviceMotionData(data); |
301 } | 301 } |
302 | 302 |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 get_bluetooth_events_callbacks_.pop_front(); | 999 get_bluetooth_events_callbacks_.pop_front(); |
1000 callback.Run(events); | 1000 callback.Run(events); |
1001 } | 1001 } |
1002 | 1002 |
1003 void BlinkTestRunner::ReportLeakDetectionResult( | 1003 void BlinkTestRunner::ReportLeakDetectionResult( |
1004 const LeakDetectionResult& report) { | 1004 const LeakDetectionResult& report) { |
1005 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1005 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1006 } | 1006 } |
1007 | 1007 |
1008 } // namespace content | 1008 } // namespace content |
OLD | NEW |