blob: 848e57997e90ce816d5f44d45dd7488d633ad839 [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
<script src="file:///gen/device/vr/public/mojom/vr_service.mojom.js"></script>
<script src="../external/wpt/resources/chromium/webxr-test.js"></script>
<script src="../xr/resources/xr-test-utils.js"></script>
<canvas id="webgl-canvas"></canvas>
<script>
let testName = "environmentBlendMode is correct for a VR device";
let fakeDeviceInitParams = { supportsImmersive:true };
let requestSessionOptions = [
{ mode: 'inline' },
{ mode: 'immersive-vr' },
];
let testFunction = function(session, t) {
t.step(() => {
assert_equals(session.environmentBlendMode, 'opaque');
});
};
xr_session_promise_test(
testFunction, fakeDeviceInitParams, requestSessionOptions, testName);
// TODO(https://crbug.com/828321): Enable once session options for AR are in place.
/*xr_session_promise_test( (session, t) => {
t.step(() => {
assert_equals(session.environmentBlendMode, 'alpha-blend');
});
}, fakeDevices["FakeARPhone"], [
{ ar: true, outputContext: getOutputContext() }
],
"environmentBlendMode is correct for an AR device");*/
</script>