Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<body>
<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.js"></script>
<script>
let testARFunction = (testSession) => new Promise((resolve) => {
function onFrame(time, xrFrame) {
assert_not_equals(testSession.environmentBlendMode, "opaque");
assert_in_array(testSession.environmentBlendMode, ["alpha-blend", "additive"]);
resolve();
}
testSession.requestAnimationFrame(onFrame);
});
let testVRFunction = (testSession) => new Promise((resolve) => {
function onFrame(time, xrFrame) {
assert_not_equals(testSession.environmentBlendMode, "alpha-blend");
assert_in_array(testSession.environmentBlendMode, ["opaque", "additive"]);
resolve();
}
testSession.requestAnimationFrame(onFrame);
});
xr_session_promise_test(
"Tests environmentBlendMode for an AR device",
testARFunction, IMMERSIVE_AR_DEVICE, 'immersive-ar');
xr_session_promise_test(
"Tests environmentBlendMode for a VR device",
testVRFunction, TRACKED_IMMERSIVE_DEVICE, 'immersive-vr');
</script>
</body>