-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic Sensor: Add functionality tests for OrientationSensor #5870
Generic Sensor: Add functionality tests for OrientationSensor #5870
Conversation
Firefox (nightly)Testing web-platform-tests at revision 1914a86 All results10 tests ran/accelerometer/Accelerometer.https.html
/accelerometer/Accelerometer_insecure_context.html
/ambient-light/AmbientLightSensor.https.html
/ambient-light/AmbientLightSensor_insecure_context.html
/gyroscope/Gyroscope.https.html
/gyroscope/Gyroscope_insecure_context.html
/magnetometer/Magnetometer.https.html
/magnetometer/Magnetometer_insecure_context.html
/orientation-sensor/OrientationSensor.https.html
/orientation-sensor/OrientationSensor_insecure_context.html
|
Sauce (safari)Testing web-platform-tests at revision 1914a86 All results10 tests ran/accelerometer/Accelerometer.https.html
/accelerometer/Accelerometer_insecure_context.html
/ambient-light/AmbientLightSensor.https.html
/ambient-light/AmbientLightSensor_insecure_context.html
/gyroscope/Gyroscope.https.html
/gyroscope/Gyroscope_insecure_context.html
/magnetometer/Magnetometer.https.html
/magnetometer/Magnetometer_insecure_context.html
/orientation-sensor/OrientationSensor.https.html
/orientation-sensor/OrientationSensor_insecure_context.html
|
Chrome (unstable)Testing web-platform-tests at revision 1914a86 |
Sauce (MicrosoftEdge)Testing web-platform-tests at revision 1914a86 All results10 tests ran/accelerometer/Accelerometer.https.html
/accelerometer/Accelerometer_insecure_context.html
/ambient-light/AmbientLightSensor.https.html
/ambient-light/AmbientLightSensor_insecure_context.html
/gyroscope/Gyroscope.https.html
/gyroscope/Gyroscope_insecure_context.html
/magnetometer/Magnetometer.https.html
/magnetometer/Magnetometer_insecure_context.html
/orientation-sensor/OrientationSensor.https.html
/orientation-sensor/OrientationSensor_insecure_context.html
|
8bd4a77
to
95d5795
Compare
@alexshalamov, @pozdnyakov, PTAL. |
|
||
let mat_64 = new Float64Array(16); | ||
sensor.populateMatrix(mat_64); | ||
assert_array_approx_equals(mat_64, mat_expect, double_precision); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not to use assert_array_equals from testharness? DomMatrix and Float64Array would not lose precision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We found the test result is sometime failed due to lose precision issue in Float64Array and thought it was same as Float32Array. I will fix it and file bug if the failure occurs again.
// Works for all supported types. | ||
let mat_32 = new Float32Array(16); | ||
sensor.populateMatrix(mat_32); | ||
assert_array_approx_equals(mat_32, mat_expect, float_precision); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like WebAudio has similar helper, maybe it needs to be moved to generic testharness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I will try to add it to testharness and back to update the test once it is accepted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexshalamov, this assertion has been accepted in testharness.js, see #6682
- Do not use approx for DOMMatrix and Float64Array - Convert DOMMatrix to Float64Array for comparision
as it has been a generic assertion in testharness.js, see web-platform-tests#5870
as it has been a generic assertion in testharness.js, see #5870
@alexshalamov, thanks for your review, I will merge it directly. |
…atform-tests#5870) * Generic Sensor: Add functionality tests for OrientationSensor
No description provided.