Add tests for layer creation failing

This commit is contained in:
Alan Jeffrey 2020-08-04 15:41:51 -05:00
parent d255dc9f7b
commit a2fa556315
2 changed files with 22 additions and 1 deletions

View file

@ -14719,7 +14719,7 @@
]
],
"layers.html": [
"f64cc1f30f469351b83cd1c12a0584b1db5317a7",
"b6749f208a8f3c5ae78fbe72cfa7364829abb127",
[
null,
{}

View file

@ -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"
);
});
</script>
</body>