Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Tests for paint flashing</title>
5 <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
7 <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
8 <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/paint_listener.js"></script>
10 <script type="application/javascript">
11 SimpleTest.waitForExplicitFinish();
12 function startTest() {
13 waitForAllPaintsFlushed(function () {
14 var before = snapshotWindow(window, false);
15 SpecialPowers.getDOMWindowUtils(window).paintFlashing = true;
16 document.body.innerHTML = "bar";
17 waitForAllPaintsFlushed(function () {
18 document.body.innerHTML = "foo";
19 waitForAllPaintsFlushed(function () {
20 var after = snapshotWindow(window, false);
21 ok(compareSnapshots(before, after, false)[0], "windows are different");
22 SpecialPowers.getDOMWindowUtils(window).paintFlashing = false;
23 SimpleTest.finish();
24 });
25 });
26 });
27 }
28 </script>
29 </head>
30 <body onload="startTest()">foo</body>
31 </html>