blob: 3ef63ad11ba57d43c0f2a4e4164989fd9ac74704 [file] [log] [blame]
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script src="resources/webgl-test.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description("Verifies that when constructing WebGLArray with nan values, it results in a 0");
var source, target, idx;
source = new Array(10);
target = new Uint8Array(source);
shouldBe(target.length.toString(), source.length.toString())
for (idx = 0; idx < target.length; idx++) {
shouldBeZero(target[idx].toString());
}
source = {length: 10};
target = new Uint8Array(source);
shouldBe(target.length.toString(), source.length.toString())
for (idx = 0; idx < target.length; idx++) {
shouldBeZero(target[idx].toString());
}
</script>
</body>
</html>