<div id="result">PASS if the first context was lost due to creating too many WebGL contexts.</div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

var maxNumberOfActiveContexts = 16;
var contexts = [];
for (var i = 0; i <= maxNumberOfActiveContexts; i++)
    contexts[i] = document.createElement("canvas").getContext("webgl");

if (!contexts[0].isContextLost())
    document.getElementById("result").textContent = "FAIL";
</script>
