<!DOCTYPE HTML>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

(function() {
  var canvas = document.createElement("canvas");
  canvas.width = 99;
  canvas.height = 99;
  var context = canvas.getContext("2d");
  context.fillStyle = '#f00';
  context.fillRect(0, 0, 100, 100);
})();

if (window.GCController)
  GCController.collect();

var canvas = document.createElement("canvas");
canvas.width = 95;
canvas.height = 95;
var context = canvas.getContext("2d");
var data = context.getImageData(50, 50, 1, 1);
shouldBe("data.data", "[0, 0, 0, 0]");
document.body.appendChild(canvas);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
