mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
webgl: Add test for getSupportedExtensions
This commit is contained in:
parent
b740b90b8d
commit
75ecb67e62
3 changed files with 29 additions and 3 deletions
|
@ -5047,10 +5047,16 @@
|
||||||
"url": "/_mozilla/mozilla/variadic-interface.html"
|
"url": "/_mozilla/mozilla/variadic-interface.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mozilla/webgl_context_creation_error.html": [
|
"mozilla/webgl/context_creation_error.html": [
|
||||||
{
|
{
|
||||||
"path": "mozilla/webgl_context_creation_error.html",
|
"path": "mozilla/webgl/context_creation_error.html",
|
||||||
"url": "/_mozilla/mozilla/webgl_context_creation_error.html"
|
"url": "/_mozilla/mozilla/webgl/context_creation_error.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"mozilla/webgl/get_supported_extensions.html": [
|
||||||
|
{
|
||||||
|
"path": "mozilla/webgl/get_supported_extensions.html",
|
||||||
|
"url": "/_mozilla/mozilla/webgl/get_supported_extensions.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mozilla/websocket_connection_fail.html": [
|
"mozilla/websocket_connection_fail.html": [
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>WebGLContextEvent getSupportedExtensions test</title>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
test(function() {
|
||||||
|
var gl = document.createElement("canvas").getContext("webgl");
|
||||||
|
|
||||||
|
if (!gl)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var extensions = gl.getSupportedExtensions();
|
||||||
|
assert_true(Array.isArray(extensions), "getSupportedExtensions should return an array");
|
||||||
|
|
||||||
|
for (var i = 0; i < extensions.length; ++i)
|
||||||
|
assert_true(typeof(extensions[i]) === "string", "Extensions should be strings, got " + typeof(extensions[i]));
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue