layout/base/tests/chrome/test_bug847890_paintFlashing.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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>

mercurial