aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/mozilla
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2019-06-12 11:17:06 -0700
committerManish Goregaokar <manishsmail@gmail.com>2019-06-12 11:45:28 -0700
commitf09d1608236976d946bcd76d665133dc05328f96 (patch)
treee870f72016cae9f3b3d4a5c862577668d7bd1022 /tests/wpt/mozilla
parent73bd249b7aed31ce51fbbe415595b6a5876bc43b (diff)
downloadservo-f09d1608236976d946bcd76d665133dc05328f96.tar.gz
servo-f09d1608236976d946bcd76d665133dc05328f96.zip
Add test for viewer head pose
Diffstat (limited to 'tests/wpt/mozilla')
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json2
-rw-r--r--tests/wpt/mozilla/tests/webxr/obtain_frame.html5
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 834c45da73d..9e8a6d236d6 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -19687,7 +19687,7 @@
"testharness"
],
"webxr/obtain_frame.html": [
- "d3c7d85c6cc6fcb65e674e8aeeab59b16db6c0a3",
+ "5182093b33f0870550157d648e41376a91fd95ce",
"testharness"
],
"webxr/resources/webxr-util.js": [
diff --git a/tests/wpt/mozilla/tests/webxr/obtain_frame.html b/tests/wpt/mozilla/tests/webxr/obtain_frame.html
index d3c7d85c6cc..5182093b33f 100644
--- a/tests/wpt/mozilla/tests/webxr/obtain_frame.html
+++ b/tests/wpt/mozilla/tests/webxr/obtain_frame.html
@@ -24,9 +24,10 @@
let space = await session.requestReferenceSpace("local");
let pose = frame.getViewerPose(space);
- for (view of pose.views) {
- assert_matrix_approx_equals(view.projectionMatrix, VALID_PROJECTION_MATRIX, 0.001, "left projection matrix");
+ assert_matrix_approx_equals(pose.transform.matrix, [1,0,0,0,0,0,1,0,0,-1,0,0,0.5,0.1,0.1,1], 0.001, "head pose matrix");
+ for (view of pose.views) {
+ assert_matrix_approx_equals(view.projectionMatrix, VALID_PROJECTION_MATRIX, 0.001, "projection matrix");
if (view.eye == "left") {
assert_matrix_approx_equals(view.transform.matrix, [1,0,0,0,0,0,1,0,0,-1,0,0,0.4,0.1,0.1,1], 0.001, "left transform");
assert_matrix_approx_equals(view.transform.inverse.matrix, [1,0,0,0,0,0,-1,0,0,1,0,0,-0.4,-0.1,0.1,1], 0.001, "left inverse transform");