layout/base/tests/chrome/test_bug847890_paintFlashing.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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>

mercurial