<!DOCTYPE html>
<canvas></canvas>
<script>

if (window.testRunner)
  testRunner.waitUntilDone();

var canvas = document.querySelector("canvas");
var context = canvas.getContext("2d");

// first frame

requestAnimationFrame(function() {

  // second frame which doesn't have a dirty
  context.scale(2, 1);

  requestAnimationFrame(function() {

    // third frame which has a dirty
    context.scale(2, 1);
    context.fillRect(0, 0, 10, 10);

    if (window.testRunner)
      testRunner.notifyDone();

  });
});

</script>
