summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webxr/xrWebGLLayer_framebuffer_sameObject.https.html
blob: 75efc626d69e7d2d46366191f18112ccbc56f4f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!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.js"></script>

<script>

let testName = "XRWebGLLayer.framebuffer meets [SameObject] requirement";

let testFunction =
  (session, fakeDeviceController, t, sessionObjects) => new Promise((resolve, reject) => {
  let layer = new XRWebGLLayer(session, sessionObjects.gl, {});
  let framebuffer = layer.framebuffer;
  t.step(() => {
    assert_equals(framebuffer, layer.framebuffer,
      "XRWebGLLayer.framebuffer returns the same object.");
  });
  resolve();
});

xr_session_promise_test(
  testName, testFunction, TRACKED_IMMERSIVE_DEVICE, 'immersive-vr');

</script>