From a2fa556315488b0168e4e834137c60f4504f64d7 Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Tue, 4 Aug 2020 15:41:51 -0500 Subject: [PATCH] Add tests for layer creation failing --- tests/wpt/mozilla/meta/MANIFEST.json | 2 +- tests/wpt/mozilla/tests/webxr/layers.html | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index efd06ac5803..b4d358816e2 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -14719,7 +14719,7 @@ ] ], "layers.html": [ - "f64cc1f30f469351b83cd1c12a0584b1db5317a7", + "b6749f208a8f3c5ae78fbe72cfa7364829abb127", [ null, {} diff --git a/tests/wpt/mozilla/tests/webxr/layers.html b/tests/wpt/mozilla/tests/webxr/layers.html index f64cc1f30f4..b6749f208a8 100644 --- a/tests/wpt/mozilla/tests/webxr/layers.html +++ b/tests/wpt/mozilla/tests/webxr/layers.html @@ -48,6 +48,27 @@ () => { session.updateRenderState({ layers: [layer], baseLayer: layer }); }, "Setting both baseLayer and layers should fail" ); + + assert_throws_dom( + "NotSupportedError", + () => { glLayerFactory.createQuadLayer("texture"); }, + "Creating a quad layer without the layers feature should fail" + ); + assert_throws_dom( + "NotSupportedError", + () => { glLayerFactory.createCylinderLayer("texture"); }, + "Creating a cylinder layer without the layers feature should fail" + ); + assert_throws_dom( + "NotSupportedError", + () => { glLayerFactory.createEquirectLayer("texture"); }, + "Creating a equirect layer without the layers feature should fail" + ); + assert_throws_dom( + "NotSupportedError", + () => { glLayerFactory.createCubeLayer(); }, + "Creating a cube layer without the layers feature should fail" + ); });