Skip to content
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

Merged
merged 5 commits into from
Aug 7, 2017

Conversation

Honry
Copy link
Contributor

@Honry Honry commented May 10, 2017

No description provided.

@Honry Honry changed the title Generic Sensor: Add functionality tests for AbsoluteOrientationSensor Generic Sensor: Add functionality tests for OrientationSensor Jul 28, 2017
@w3c-bots
Copy link

w3c-bots commented Jul 28, 2017

View the complete job log.

Firefox (nightly)

Testing web-platform-tests at revision 1914a86
Using binary /home/travis/build/w3c/web-platform-tests/_venv/firefox/firefox
Starting tests
All results were stable

All results

10 tests ran
/accelerometer/Accelerometer.https.html
Subtest Results Messages
OK
Accelerometer Test FAIL ReferenceError: Accelerometer is not defined
/accelerometer/Accelerometer_insecure_context.html
Subtest Results Messages
OK
Accelerometer Test: insecure context FAIL ReferenceError: Accelerometer is not defined
/ambient-light/AmbientLightSensor.https.html
Subtest Results Messages
OK
AmbientLightSensor Test FAIL ReferenceError: AmbientLightSensor is not defined
/ambient-light/AmbientLightSensor_insecure_context.html
Subtest Results Messages
OK
AmbientLightSensor Test: insecure context FAIL ReferenceError: AmbientLightSensor is not defined
/gyroscope/Gyroscope.https.html
Subtest Results Messages
OK
Gyroscope Test FAIL ReferenceError: Gyroscope is not defined
/gyroscope/Gyroscope_insecure_context.html
Subtest Results Messages
OK
Gyroscope Test: insecure context FAIL ReferenceError: Gyroscope is not defined
/magnetometer/Magnetometer.https.html
Subtest Results Messages
OK
Magnetometer Test FAIL ReferenceError: Magnetometer is not defined
/magnetometer/Magnetometer_insecure_context.html
Subtest Results Messages
OK
Magnetometer Test: insecure context FAIL ReferenceError: Magnetometer is not defined
/orientation-sensor/OrientationSensor.https.html
Subtest Results Messages
ERROR
Test AbsoluteOrientationSensor.quaternion return a four-element FrozenArray. FAIL AbsoluteOrientationSensor is not defined
Test RelativeOrientationSensor.quaternion return a four-element FrozenArray. FAIL RelativeOrientationSensor is not defined
Test AbsoluteOrientationSensor.populateMatrix() method works correctly. FAIL AbsoluteOrientationSensor is not defined
Test RelativeOrientationSensor.populateMatrix() method works correctly. FAIL RelativeOrientationSensor is not defined
/orientation-sensor/OrientationSensor_insecure_context.html
Subtest Results Messages
OK
AbsoluteOrientationSensor Test: insecure context FAIL ReferenceError: AbsoluteOrientationSensor is not defined

@w3c-bots
Copy link

w3c-bots commented Jul 28, 2017

View the complete job log.

Sauce (safari)

Testing web-platform-tests at revision 1914a86
Using binary None
Starting tests
All results were stable

All results

10 tests ran
/accelerometer/Accelerometer.https.html
Subtest Results Messages
OK
Accelerometer Test FAIL ReferenceError: Can't find variable: Accelerometer
/accelerometer/Accelerometer_insecure_context.html
Subtest Results Messages
OK
Accelerometer Test: insecure context FAIL ReferenceError: Can't find variable: Accelerometer
/ambient-light/AmbientLightSensor.https.html
Subtest Results Messages
OK
AmbientLightSensor Test FAIL ReferenceError: Can't find variable: AmbientLightSensor
/ambient-light/AmbientLightSensor_insecure_context.html
Subtest Results Messages
OK
AmbientLightSensor Test: insecure context FAIL ReferenceError: Can't find variable: AmbientLightSensor
/gyroscope/Gyroscope.https.html
Subtest Results Messages
OK
Gyroscope Test FAIL ReferenceError: Can't find variable: Gyroscope
/gyroscope/Gyroscope_insecure_context.html
Subtest Results Messages
OK
Gyroscope Test: insecure context FAIL ReferenceError: Can't find variable: Gyroscope
/magnetometer/Magnetometer.https.html
Subtest Results Messages
OK
Magnetometer Test FAIL ReferenceError: Can't find variable: Magnetometer
/magnetometer/Magnetometer_insecure_context.html
Subtest Results Messages
OK
Magnetometer Test: insecure context FAIL ReferenceError: Can't find variable: Magnetometer
/orientation-sensor/OrientationSensor.https.html
Subtest Results Messages
ERROR
Test AbsoluteOrientationSensor.quaternion return a four-element FrozenArray. FAIL Can't find variable: AbsoluteOrientationSensor
Test RelativeOrientationSensor.quaternion return a four-element FrozenArray. FAIL Can't find variable: RelativeOrientationSensor
Test AbsoluteOrientationSensor.populateMatrix() method works correctly. FAIL Can't find variable: AbsoluteOrientationSensor
Test RelativeOrientationSensor.populateMatrix() method works correctly. FAIL Can't find variable: RelativeOrientationSensor
/orientation-sensor/OrientationSensor_insecure_context.html
Subtest Results Messages
OK
AbsoluteOrientationSensor Test: insecure context FAIL ReferenceError: Can't find variable: AbsoluteOrientationSensor

@w3c-bots
Copy link

w3c-bots commented Jul 28, 2017

View the complete job log.

Chrome (unstable)

Testing web-platform-tests at revision 1914a86
Using binary None
Starting tests

@w3c-bots
Copy link

w3c-bots commented Jul 28, 2017

View the complete job log.

Sauce (MicrosoftEdge)

Testing web-platform-tests at revision 1914a86
Using binary None
Starting tests
All results were stable

All results

10 tests ran
/accelerometer/Accelerometer.https.html
Subtest Results Messages
OK
Accelerometer Test FAIL 'Accelerometer' is undefined
/accelerometer/Accelerometer_insecure_context.html
Subtest Results Messages
OK
Accelerometer Test: insecure context FAIL 'Accelerometer' is undefined
/ambient-light/AmbientLightSensor.https.html
Subtest Results Messages
OK
AmbientLightSensor Test FAIL 'AmbientLightSensor' is undefined
/ambient-light/AmbientLightSensor_insecure_context.html
Subtest Results Messages
OK
AmbientLightSensor Test: insecure context FAIL 'AmbientLightSensor' is undefined
/gyroscope/Gyroscope.https.html
Subtest Results Messages
OK
Gyroscope Test FAIL 'Gyroscope' is undefined
/gyroscope/Gyroscope_insecure_context.html
Subtest Results Messages
OK
Gyroscope Test: insecure context FAIL 'Gyroscope' is undefined
/magnetometer/Magnetometer.https.html
Subtest Results Messages
OK
Magnetometer Test FAIL 'Magnetometer' is undefined
/magnetometer/Magnetometer_insecure_context.html
Subtest Results Messages
OK
Magnetometer Test: insecure context FAIL 'Magnetometer' is undefined
/orientation-sensor/OrientationSensor.https.html
Subtest Results Messages
ERROR
Test AbsoluteOrientationSensor.quaternion return a four-element FrozenArray. FAIL 'AbsoluteOrientationSensor' is undefined
Test RelativeOrientationSensor.quaternion return a four-element FrozenArray. FAIL 'RelativeOrientationSensor' is undefined
Test AbsoluteOrientationSensor.populateMatrix() method works correctly. FAIL 'AbsoluteOrientationSensor' is undefined
Test RelativeOrientationSensor.populateMatrix() method works correctly. FAIL 'RelativeOrientationSensor' is undefined
/orientation-sensor/OrientationSensor_insecure_context.html
Subtest Results Messages
OK
AbsoluteOrientationSensor Test: insecure context FAIL 'AbsoluteOrientationSensor' is undefined

@Honry Honry force-pushed the sensor/absoulteorientation branch from 8bd4a77 to 95d5795 Compare July 28, 2017 06:25
@Honry
Copy link
Contributor Author

Honry commented Jul 31, 2017

@alexshalamov, @pozdnyakov, PTAL.


let mat_64 = new Float64Array(16);
sensor.populateMatrix(mat_64);
assert_array_approx_equals(mat_64, mat_expect, double_precision);

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.

Copy link
Contributor Author

@Honry Honry Aug 1, 2017

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);

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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
Honry added a commit to Honry/web-platform-tests that referenced this pull request Aug 4, 2017
 as it has been a generic assertion in testharness.js,
 see web-platform-tests#5870
gsnedders pushed a commit that referenced this pull request Aug 4, 2017
as it has been a generic assertion in testharness.js,
 see #5870
@Honry
Copy link
Contributor Author

Honry commented Aug 7, 2017

@alexshalamov, thanks for your review, I will merge it directly.

@Honry Honry merged commit 222d14c into web-platform-tests:master Aug 7, 2017
@Honry Honry deleted the sensor/absoulteorientation branch August 7, 2017 01:37
rachelandrew pushed a commit to rachelandrew/web-platform-tests that referenced this pull request Nov 8, 2017
…atform-tests#5870)

* Generic Sensor: Add functionality tests for OrientationSensor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants