Automatic update from web-platform-tests WebKit export of https://bugs.webkit.org/show_bug.cgi?id=302262 -- wpt-commits: 0661a068a53a2ff99a0407f92cb202b966bb23c1 wpt-pr: 55993
37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
<!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>
|
|
|