blob: 1debb1146fa9742bfee6ebd22bf33d45c906c2f7 [file] [log] [blame]
<canvas id="a"></canvas>
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
function run()
{
const out = document.querySelector("p");
let result = "";
if (!window.internals) {
out.innerText = "Test requires internals.";
return;
}
const canvasA = document.getElementById("a");
const glA = canvasA.getContext("webgl");
const requested = internals.requestedMetal(glA);
const supported = internals.platformSupportsMetal(false);
let resultStr = "OK";
if (requested != supported)
resultStr = "FAIL";
result += `Metal for WebGL1 enabled matches platform support: ${resultStr}<br>`;
out.innerHTML = result;
}
window.addEventListener("load", run, false);
</script>
<p></p>