| 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 "components/test_runner/test_runner.h" | 5 #include "components/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 15 matching lines...) Expand all Loading... |
| 26 #include "components/test_runner/mock_web_speech_recognizer.h" | 26 #include "components/test_runner/mock_web_speech_recognizer.h" |
| 27 #include "components/test_runner/mock_web_user_media_client.h" | 27 #include "components/test_runner/mock_web_user_media_client.h" |
| 28 #include "components/test_runner/pixel_dump.h" | 28 #include "components/test_runner/pixel_dump.h" |
| 29 #include "components/test_runner/spell_check_client.h" | 29 #include "components/test_runner/spell_check_client.h" |
| 30 #include "components/test_runner/test_common.h" | 30 #include "components/test_runner/test_common.h" |
| 31 #include "components/test_runner/test_interfaces.h" | 31 #include "components/test_runner/test_interfaces.h" |
| 32 #include "components/test_runner/test_preferences.h" | 32 #include "components/test_runner/test_preferences.h" |
| 33 #include "components/test_runner/test_runner_for_specific_view.h" | 33 #include "components/test_runner/test_runner_for_specific_view.h" |
| 34 #include "components/test_runner/web_test_delegate.h" | 34 #include "components/test_runner/web_test_delegate.h" |
| 35 #include "components/test_runner/web_view_test_proxy.h" | 35 #include "components/test_runner/web_view_test_proxy.h" |
| 36 #include "device/sensors/public/cpp/motion_data.h" |
| 37 #include "device/sensors/public/cpp/orientation_data.h" |
| 36 #include "gin/arguments.h" | 38 #include "gin/arguments.h" |
| 37 #include "gin/array_buffer.h" | 39 #include "gin/array_buffer.h" |
| 38 #include "gin/handle.h" | 40 #include "gin/handle.h" |
| 39 #include "gin/object_template_builder.h" | 41 #include "gin/object_template_builder.h" |
| 40 #include "gin/wrappable.h" | 42 #include "gin/wrappable.h" |
| 41 #include "third_party/WebKit/public/platform/WebCanvas.h" | 43 #include "third_party/WebKit/public/platform/WebCanvas.h" |
| 42 #include "third_party/WebKit/public/platform/WebData.h" | 44 #include "third_party/WebKit/public/platform/WebData.h" |
| 43 #include "third_party/WebKit/public/platform/WebPasswordCredential.h" | 45 #include "third_party/WebKit/public/platform/WebPasswordCredential.h" |
| 44 #include "third_party/WebKit/public/platform/WebPoint.h" | 46 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 45 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 47 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 46 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionData.h" | |
| 47 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationData.h" | |
| 48 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerRegistration.h" | 48 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor
kerRegistration.h" |
| 49 #include "third_party/WebKit/public/web/WebArrayBuffer.h" | 49 #include "third_party/WebKit/public/web/WebArrayBuffer.h" |
| 50 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h" | 50 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h" |
| 51 #include "third_party/WebKit/public/web/WebDataSource.h" | 51 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 52 #include "third_party/WebKit/public/web/WebDocument.h" | 52 #include "third_party/WebKit/public/web/WebDocument.h" |
| 53 #include "third_party/WebKit/public/web/WebFindOptions.h" | 53 #include "third_party/WebKit/public/web/WebFindOptions.h" |
| 54 #include "third_party/WebKit/public/web/WebFrame.h" | 54 #include "third_party/WebKit/public/web/WebFrame.h" |
| 55 #include "third_party/WebKit/public/web/WebInputElement.h" | 55 #include "third_party/WebKit/public/web/WebInputElement.h" |
| 56 #include "third_party/WebKit/public/web/WebKit.h" | 56 #include "third_party/WebKit/public/web/WebKit.h" |
| 57 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 57 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| (...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2186 bool has_acceleration_including_gravity_x, | 2186 bool has_acceleration_including_gravity_x, |
| 2187 double acceleration_including_gravity_x, | 2187 double acceleration_including_gravity_x, |
| 2188 bool has_acceleration_including_gravity_y, | 2188 bool has_acceleration_including_gravity_y, |
| 2189 double acceleration_including_gravity_y, | 2189 double acceleration_including_gravity_y, |
| 2190 bool has_acceleration_including_gravity_z, | 2190 bool has_acceleration_including_gravity_z, |
| 2191 double acceleration_including_gravity_z, | 2191 double acceleration_including_gravity_z, |
| 2192 bool has_rotation_rate_alpha, double rotation_rate_alpha, | 2192 bool has_rotation_rate_alpha, double rotation_rate_alpha, |
| 2193 bool has_rotation_rate_beta, double rotation_rate_beta, | 2193 bool has_rotation_rate_beta, double rotation_rate_beta, |
| 2194 bool has_rotation_rate_gamma, double rotation_rate_gamma, | 2194 bool has_rotation_rate_gamma, double rotation_rate_gamma, |
| 2195 double interval) { | 2195 double interval) { |
| 2196 WebDeviceMotionData motion; | 2196 device::MotionData motion; |
| 2197 | 2197 |
| 2198 // acceleration | 2198 // acceleration |
| 2199 motion.hasAccelerationX = has_acceleration_x; | 2199 motion.hasAccelerationX = has_acceleration_x; |
| 2200 motion.accelerationX = acceleration_x; | 2200 motion.accelerationX = acceleration_x; |
| 2201 motion.hasAccelerationY = has_acceleration_y; | 2201 motion.hasAccelerationY = has_acceleration_y; |
| 2202 motion.accelerationY = acceleration_y; | 2202 motion.accelerationY = acceleration_y; |
| 2203 motion.hasAccelerationZ = has_acceleration_z; | 2203 motion.hasAccelerationZ = has_acceleration_z; |
| 2204 motion.accelerationZ = acceleration_z; | 2204 motion.accelerationZ = acceleration_z; |
| 2205 | 2205 |
| 2206 // accelerationIncludingGravity | 2206 // accelerationIncludingGravity |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2225 // interval | 2225 // interval |
| 2226 motion.interval = interval; | 2226 motion.interval = interval; |
| 2227 | 2227 |
| 2228 delegate_->SetDeviceMotionData(motion); | 2228 delegate_->SetDeviceMotionData(motion); |
| 2229 } | 2229 } |
| 2230 | 2230 |
| 2231 void TestRunner::SetMockDeviceOrientation(bool has_alpha, double alpha, | 2231 void TestRunner::SetMockDeviceOrientation(bool has_alpha, double alpha, |
| 2232 bool has_beta, double beta, | 2232 bool has_beta, double beta, |
| 2233 bool has_gamma, double gamma, | 2233 bool has_gamma, double gamma, |
| 2234 bool absolute) { | 2234 bool absolute) { |
| 2235 WebDeviceOrientationData orientation; | 2235 device::OrientationData orientation; |
| 2236 | 2236 |
| 2237 // alpha | 2237 // alpha |
| 2238 orientation.hasAlpha = has_alpha; | 2238 orientation.hasAlpha = has_alpha; |
| 2239 orientation.alpha = alpha; | 2239 orientation.alpha = alpha; |
| 2240 | 2240 |
| 2241 // beta | 2241 // beta |
| 2242 orientation.hasBeta = has_beta; | 2242 orientation.hasBeta = has_beta; |
| 2243 orientation.beta = beta; | 2243 orientation.beta = beta; |
| 2244 | 2244 |
| 2245 // gamma | 2245 // gamma |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2794 | 2794 |
| 2795 void TestRunner::NotifyDone() { | 2795 void TestRunner::NotifyDone() { |
| 2796 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() && | 2796 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() && |
| 2797 !will_navigate_ && work_queue_.is_empty()) | 2797 !will_navigate_ && work_queue_.is_empty()) |
| 2798 delegate_->TestFinished(); | 2798 delegate_->TestFinished(); |
| 2799 layout_test_runtime_flags_.set_wait_until_done(false); | 2799 layout_test_runtime_flags_.set_wait_until_done(false); |
| 2800 OnLayoutTestRuntimeFlagsChanged(); | 2800 OnLayoutTestRuntimeFlagsChanged(); |
| 2801 } | 2801 } |
| 2802 | 2802 |
| 2803 } // namespace test_runner | 2803 } // namespace test_runner |
| OLD | NEW |