<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webxr_util.js"></script>
<script src="resources/webxr_test_constants_single_view.js"></script>
<script src="../../webxr/resources/webxr_test_asserts.js"></script>

<script>
let testName = "Test XRFrame.getJointPose";

let fakeDeviceInitParams = TRACKED_IMMERSIVE_DEVICE_WITH_HAND_TRACKING;

let testFunction = function(session, fakeDeviceController, t, sessionObjects) {

  let input_source = fakeDeviceController.simulateInputSourceConnection({
    handedness: "none",
    targetRayMode: "tracked-pointer",
    pointerOrigin: VALID_POINTER_TRANSFORM,
    profiles: [],
    handJoints: VALID_HAND_JOINTS,
  });

  return session.requestReferenceSpace('local')
    .then((referenceSpace) => new Promise((resolve) => {

      function onFrame(time, xrFrame) {
        assert_not_equals(session.inputSources.length, 0);
        let hand = session.inputSources[0].hand
        assert_not_equals(hand, null);
        
        let jointSpace = hand.get("wrist");
        assert_not_equals(jointSpace, null);
        
        let jointPose = xrFrame.getJointPose(jointSpace, referenceSpace);
        assert_not_equals(jointPose, null);
        assert_approx_equals(jointPose.radius, TEST_HAND_JOINT_RADIUS, FLOAT_EPSILON);
        assert_matrix_approx_equals(jointPose.transform.matrix, VALID_POSE_MATRIX, FLOAT_EPSILON);

        resolve();
      }
      session.requestAnimationFrame(onFrame);
  }));
};

xr_session_promise_test(
  testName, testFunction, fakeDeviceInitParams, 'immersive-vr', { optionalFeatures: ["hand-tracking"] });

</script>
