mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
ba9fb189e6
(transplanted from 9b29864cabd1b25cf5184d4f96ad75ff8ce99d4c) --HG-- extra : transplant_source : %9B%29%86L%AB%D1%B2%5C%F5%18MO%96%ADu%FF%8C%E9%9DL
48 lines
1.3 KiB
HTML
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>
|
|
|