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
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Tests for paint flashing</title> |
michael@0 | 5 | <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/> |
michael@0 | 7 | <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script> |
michael@0 | 8 | <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/paint_listener.js"></script> |
michael@0 | 9 | |
michael@0 | 10 | <script type="application/javascript"> |
michael@0 | 11 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 12 | function startTest() { |
michael@0 | 13 | waitForAllPaintsFlushed(function () { |
michael@0 | 14 | var before = snapshotWindow(window, false); |
michael@0 | 15 | SpecialPowers.getDOMWindowUtils(window).paintFlashing = true; |
michael@0 | 16 | document.body.innerHTML = "bar"; |
michael@0 | 17 | waitForAllPaintsFlushed(function () { |
michael@0 | 18 | document.body.innerHTML = "foo"; |
michael@0 | 19 | waitForAllPaintsFlushed(function () { |
michael@0 | 20 | var after = snapshotWindow(window, false); |
michael@0 | 21 | ok(compareSnapshots(before, after, false)[0], "windows are different"); |
michael@0 | 22 | SpecialPowers.getDOMWindowUtils(window).paintFlashing = false; |
michael@0 | 23 | SimpleTest.finish(); |
michael@0 | 24 | }); |
michael@0 | 25 | }); |
michael@0 | 26 | }); |
michael@0 | 27 | } |
michael@0 | 28 | </script> |
michael@0 | 29 | </head> |
michael@0 | 30 | <body onload="startTest()">foo</body> |
michael@0 | 31 | </html> |