dom/plugins/test/reftest/plugin-asyncbitmap-update.html
author Bas Schouten <bschouten@mozilla.com>
Thu, 16 Feb 2012 04:30:32 +0100
changeset 88080 b2de8767a482c241ef63e5988061ba11912999b1
permissions -rw-r--r--
Bug 651192 - Part 9: Add reftests for NPAPIAsync plugin functionality. r=roc

<!doctype html>
<html class="reftest-wait"><head>
<title>Plugin boxes</title>
</head>
<body>
<embed type="application/x-test" width="400" height="400" drawmode="solid" color="FFFF0000" id="plugin" asyncmodel="bitmap"></embed> <!-- red -->
<script>
  var prevPaintCount = 0;
  function doTestWait() {
    if (window.mozPaintCount != prevPaintCount) {
      document.documentElement.removeAttribute('class');
    } else {
      setTimeout(doTestWait, 0);
    }
  }

  function doTest() {
    prevPaintCount = window.mozPaintCount;
    document.getElementById("plugin").setColor("FF00FF00");
    setTimeout(doTestWait, 0);
  }
  window.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</body></html>