OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test_runner/test_runner.h" | 5 #include "content/shell/test_runner/test_runner.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <limits> | 8 #include <limits> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "content/shell/test_runner/mock_web_speech_recognizer.h" | 25 #include "content/shell/test_runner/mock_web_speech_recognizer.h" |
26 #include "content/shell/test_runner/mock_web_user_media_client.h" | 26 #include "content/shell/test_runner/mock_web_user_media_client.h" |
27 #include "content/shell/test_runner/pixel_dump.h" | 27 #include "content/shell/test_runner/pixel_dump.h" |
28 #include "content/shell/test_runner/spell_check_client.h" | 28 #include "content/shell/test_runner/spell_check_client.h" |
29 #include "content/shell/test_runner/test_common.h" | 29 #include "content/shell/test_runner/test_common.h" |
30 #include "content/shell/test_runner/test_interfaces.h" | 30 #include "content/shell/test_runner/test_interfaces.h" |
31 #include "content/shell/test_runner/test_preferences.h" | 31 #include "content/shell/test_runner/test_preferences.h" |
32 #include "content/shell/test_runner/test_runner_for_specific_view.h" | 32 #include "content/shell/test_runner/test_runner_for_specific_view.h" |
33 #include "content/shell/test_runner/web_test_delegate.h" | 33 #include "content/shell/test_runner/web_test_delegate.h" |
34 #include "content/shell/test_runner/web_view_test_proxy.h" | 34 #include "content/shell/test_runner/web_view_test_proxy.h" |
| 35 #include "device/sensors/public/cpp/motion_data.h" |
| 36 #include "device/sensors/public/cpp/orientation_data.h" |
35 #include "gin/arguments.h" | 37 #include "gin/arguments.h" |
36 #include "gin/array_buffer.h" | 38 #include "gin/array_buffer.h" |
37 #include "gin/handle.h" | 39 #include "gin/handle.h" |
38 #include "gin/object_template_builder.h" | 40 #include "gin/object_template_builder.h" |
39 #include "gin/wrappable.h" | 41 #include "gin/wrappable.h" |
40 #include "third_party/WebKit/public/platform/WebCanvas.h" | 42 #include "third_party/WebKit/public/platform/WebCanvas.h" |
41 #include "third_party/WebKit/public/platform/WebData.h" | 43 #include "third_party/WebKit/public/platform/WebData.h" |
42 #include "third_party/WebKit/public/platform/WebPasswordCredential.h" | 44 #include "third_party/WebKit/public/platform/WebPasswordCredential.h" |
43 #include "third_party/WebKit/public/platform/WebPoint.h" | 45 #include "third_party/WebKit/public/platform/WebPoint.h" |
44 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 46 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
45 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionData.h" | |
46 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationData.h" | |
47 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerRegistration.h" | 47 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerRegistration.h" |
48 #include "third_party/WebKit/public/web/WebArrayBuffer.h" | 48 #include "third_party/WebKit/public/web/WebArrayBuffer.h" |
49 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h" | 49 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h" |
50 #include "third_party/WebKit/public/web/WebDataSource.h" | 50 #include "third_party/WebKit/public/web/WebDataSource.h" |
51 #include "third_party/WebKit/public/web/WebDocument.h" | 51 #include "third_party/WebKit/public/web/WebDocument.h" |
52 #include "third_party/WebKit/public/web/WebFindOptions.h" | 52 #include "third_party/WebKit/public/web/WebFindOptions.h" |
53 #include "third_party/WebKit/public/web/WebFrame.h" | 53 #include "third_party/WebKit/public/web/WebFrame.h" |
54 #include "third_party/WebKit/public/web/WebInputElement.h" | 54 #include "third_party/WebKit/public/web/WebInputElement.h" |
55 #include "third_party/WebKit/public/web/WebKit.h" | 55 #include "third_party/WebKit/public/web/WebKit.h" |
56 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 56 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
(...skipping 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2235 double acceleration_including_gravity_y, | 2235 double acceleration_including_gravity_y, |
2236 bool has_acceleration_including_gravity_z, | 2236 bool has_acceleration_including_gravity_z, |
2237 double acceleration_including_gravity_z, | 2237 double acceleration_including_gravity_z, |
2238 bool has_rotation_rate_alpha, | 2238 bool has_rotation_rate_alpha, |
2239 double rotation_rate_alpha, | 2239 double rotation_rate_alpha, |
2240 bool has_rotation_rate_beta, | 2240 bool has_rotation_rate_beta, |
2241 double rotation_rate_beta, | 2241 double rotation_rate_beta, |
2242 bool has_rotation_rate_gamma, | 2242 bool has_rotation_rate_gamma, |
2243 double rotation_rate_gamma, | 2243 double rotation_rate_gamma, |
2244 double interval) { | 2244 double interval) { |
2245 WebDeviceMotionData motion; | 2245 device::MotionData motion; |
2246 | 2246 |
2247 // acceleration | 2247 // acceleration |
2248 motion.hasAccelerationX = has_acceleration_x; | 2248 motion.hasAccelerationX = has_acceleration_x; |
2249 motion.accelerationX = acceleration_x; | 2249 motion.accelerationX = acceleration_x; |
2250 motion.hasAccelerationY = has_acceleration_y; | 2250 motion.hasAccelerationY = has_acceleration_y; |
2251 motion.accelerationY = acceleration_y; | 2251 motion.accelerationY = acceleration_y; |
2252 motion.hasAccelerationZ = has_acceleration_z; | 2252 motion.hasAccelerationZ = has_acceleration_z; |
2253 motion.accelerationZ = acceleration_z; | 2253 motion.accelerationZ = acceleration_z; |
2254 | 2254 |
2255 // accelerationIncludingGravity | 2255 // accelerationIncludingGravity |
(...skipping 21 matching lines...) Expand all Loading... |
2277 delegate_->SetDeviceMotionData(motion); | 2277 delegate_->SetDeviceMotionData(motion); |
2278 } | 2278 } |
2279 | 2279 |
2280 void TestRunner::SetMockDeviceOrientation(bool has_alpha, | 2280 void TestRunner::SetMockDeviceOrientation(bool has_alpha, |
2281 double alpha, | 2281 double alpha, |
2282 bool has_beta, | 2282 bool has_beta, |
2283 double beta, | 2283 double beta, |
2284 bool has_gamma, | 2284 bool has_gamma, |
2285 double gamma, | 2285 double gamma, |
2286 bool absolute) { | 2286 bool absolute) { |
2287 WebDeviceOrientationData orientation; | 2287 device::OrientationData orientation; |
2288 | 2288 |
2289 // alpha | 2289 // alpha |
2290 orientation.hasAlpha = has_alpha; | 2290 orientation.hasAlpha = has_alpha; |
2291 orientation.alpha = alpha; | 2291 orientation.alpha = alpha; |
2292 | 2292 |
2293 // beta | 2293 // beta |
2294 orientation.hasBeta = has_beta; | 2294 orientation.hasBeta = has_beta; |
2295 orientation.beta = beta; | 2295 orientation.beta = beta; |
2296 | 2296 |
2297 // gamma | 2297 // gamma |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2839 | 2839 |
2840 void TestRunner::NotifyDone() { | 2840 void TestRunner::NotifyDone() { |
2841 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() && | 2841 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() && |
2842 !will_navigate_ && work_queue_.is_empty()) | 2842 !will_navigate_ && work_queue_.is_empty()) |
2843 delegate_->TestFinished(); | 2843 delegate_->TestFinished(); |
2844 layout_test_runtime_flags_.set_wait_until_done(false); | 2844 layout_test_runtime_flags_.set_wait_until_done(false); |
2845 OnLayoutTestRuntimeFlagsChanged(); | 2845 OnLayoutTestRuntimeFlagsChanged(); |
2846 } | 2846 } |
2847 | 2847 |
2848 } // namespace test_runner | 2848 } // namespace test_runner |
OLD | NEW |