1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/base/tests/chrome/test_bug847890_paintFlashing.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <title>Tests for paint flashing</title> 1.8 + <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.9 + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/> 1.10 + <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script> 1.11 + <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/paint_listener.js"></script> 1.12 + 1.13 + <script type="application/javascript"> 1.14 + SimpleTest.waitForExplicitFinish(); 1.15 + function startTest() { 1.16 + waitForAllPaintsFlushed(function () { 1.17 + var before = snapshotWindow(window, false); 1.18 + SpecialPowers.getDOMWindowUtils(window).paintFlashing = true; 1.19 + document.body.innerHTML = "bar"; 1.20 + waitForAllPaintsFlushed(function () { 1.21 + document.body.innerHTML = "foo"; 1.22 + waitForAllPaintsFlushed(function () { 1.23 + var after = snapshotWindow(window, false); 1.24 + ok(compareSnapshots(before, after, false)[0], "windows are different"); 1.25 + SpecialPowers.getDOMWindowUtils(window).paintFlashing = false; 1.26 + SimpleTest.finish(); 1.27 + }); 1.28 + }); 1.29 + }); 1.30 + } 1.31 + </script> 1.32 +</head> 1.33 +<body onload="startTest()">foo</body> 1.34 +</html>