mirror of
https://github.com/servo/servo.git
synced 2025-08-16 10:55:34 +01:00
Update web-platform-tests to revision 719721f655102bcd24d45eba91339eb2d7dbc591
This commit is contained in:
parent
2b84348372
commit
bc8af9cf87
70 changed files with 1271 additions and 294 deletions
|
@ -29,22 +29,38 @@ const VALID_PROJECTION_MATRIX =
|
|||
[1, 0, 0, 0, 0, 1, 0, 0, 3, 2, -1, -1, 0, 0, -0.2, 0];
|
||||
|
||||
// A valid input grip matrix for when we don't care about specific values
|
||||
const VALID_GRIP = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 4, 3, 2, 1];
|
||||
const VALID_GRIP = [1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
4, 3, 2, 1];
|
||||
|
||||
const VALID_GRIP_TRANSFORM = {
|
||||
position: [4, 3, 2],
|
||||
orientation: [0, 0, 0, 1]
|
||||
};
|
||||
|
||||
// A valid input pointer offset for when we don't care about specific values
|
||||
const VALID_POINTER_OFFSET = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1];
|
||||
const VALID_POINTER_OFFSET = [1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 1, 1];
|
||||
|
||||
const VALID_POINTER_TRANSFORM = {
|
||||
position: [0, 0, 1],
|
||||
orientation: [0, 0, 0, 1]
|
||||
};
|
||||
|
||||
const VALID_GRIP_WITH_POINTER_OFFSET =
|
||||
[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 4, 3, 3, 1];
|
||||
|
||||
// A Valid Local to floor matrix/transform for when we don't care about specific
|
||||
// values. Note that these should be identical, just different representations.
|
||||
const VALID_LOCAL_TO_FLOOR_MATRIX = [1, 0, 0, 0,
|
||||
const VALID_FLOOR_ORIGIN_MATRIX = [1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
1, 1.65, -1, 1];
|
||||
|
||||
const VALID_LOCAL_TO_FLOOR_TRANSFORM = {
|
||||
const VALID_FLOOR_ORIGIN = {
|
||||
position: [1.0, 1.65, -1.0],
|
||||
orientation: [0, 0, 0, 1]
|
||||
};
|
||||
|
@ -105,3 +121,17 @@ const VALID_NON_IMMERSIVE_DEVICE = {
|
|||
views: NON_IMMERSIVE_VIEWS,
|
||||
viewerOrigin: IDENTITY_TRANSFORM
|
||||
};
|
||||
|
||||
const VALID_CONTROLLER = {
|
||||
handedness: "none",
|
||||
targetRayMode: "tracked-pointer",
|
||||
pointerOrigin: VALID_POINTER_TRANSFORM,
|
||||
profiles: []
|
||||
};
|
||||
|
||||
const RIGHT_CONTROLLER = {
|
||||
handedness: "right",
|
||||
targetRayMode: "tracked-pointer",
|
||||
pointerOrigin: VALID_POINTER_TRANSFORM,
|
||||
profiles: []
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ let fakeDeviceInitParams = {
|
|||
supportsImmersive: true,
|
||||
views: VALID_VIEWS,
|
||||
viewerOrigin: IDENTITY_TRANSFORM,
|
||||
localToFloorLevelTransform: VALID_LOCAL_TO_FLOOR_TRANSFORM
|
||||
floorOrigin: VALID_FLOOR_ORIGIN
|
||||
};
|
||||
|
||||
let testFunction = function(session, fakeDeviceController, t) {
|
||||
|
|
|
@ -32,7 +32,7 @@ let testFunction = function(session, fakeDeviceController, t) {
|
|||
assert_greater_than(poseMatrix[13], 1.0);
|
||||
assert_approx_equals(poseMatrix[14], 0.0, FLOAT_EPSILON);
|
||||
|
||||
fakeDeviceController.setLocalToFloorLevelTransform(VALID_LOCAL_TO_FLOOR_TRANSFORM);
|
||||
fakeDeviceController.setFloorOrigin(VALID_FLOOR_ORIGIN);
|
||||
|
||||
// Need to request one animation frame for the new stage transform to
|
||||
// propagate before we check that it's what we expect.
|
||||
|
@ -49,7 +49,7 @@ let testFunction = function(session, fakeDeviceController, t) {
|
|||
assert_not_equals(pose, null);
|
||||
|
||||
let poseMatrix = pose.transform.matrix;
|
||||
assert_matrix_approx_equals(poseMatrix, VALID_LOCAL_TO_FLOOR_MATRIX, FLOAT_EPSILON);
|
||||
assert_matrix_approx_equals(poseMatrix, VALID_FLOOR_ORIGIN_MATRIX, FLOAT_EPSILON);
|
||||
});
|
||||
|
||||
// Finished.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue