gecko/layout/base/tests/test_mozPaintCount.html
Ehsan Akhgari 17d8856c83 Bug 563864 - Add some debugging output to figure out what's going on with test_mozPaintCount.html intermittent oranges (temporary test-only change)
(transplanted from 9b29864cabd1b25cf5184d4f96ad75ff8ce99d4c)

--HG--
extra : transplant_source : %9B%29%86L%AB%D1%B2%5C%F5%18MO%96%ADu%FF%8C%E9%9DL
2010-06-04 13:28:19 -04:00

48 lines
1.3 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<title>Tests for mozPaintCount</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="doFlicker()">
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
var startPaintCount = window.mozPaintCount;
ok(true, "Got to initial paint count: " + startPaintCount);
var color = 0;
function doFlicker() {
ok(true, "Iteration " + color + ", paint count: " + window.mozPaintCount);
if (window.mozPaintCount - startPaintCount > 20) {
ok(true, "Got enough paints");
SimpleTest.finish();
return;
}
color = (color + 1) % 256;
document.body.style.backgroundColor = "rgb(" + color + "," + color + "," + color + ")";
setTimeout(doFlicker, 0);
}
</script>
</pre>
<div style="height:4000px"></div>
<a id="first" href="http://www.mozilla.org/">first<br>link</a>
<a id="second" href="http://www.mozilla.org/">second link</a>
<a id="third" href="http://www.mozilla.org/">third<br>link</a>
<div style="height:4000px"></div>
</body>
</html>