layout/style/test/test_transitions_bug537151.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 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=537151
     5 -->
     6 <head>
     7   <title>Test for Bug 537151</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10   <style type="text/css">
    12   #display {
    13     transition: margin-left 200ms;
    14   }
    16   </style>
    17 </head>
    18 <body>
    19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=537151">Mozilla Bug 537151</a>
    20 <p id="display">Paragraph</p>
    21 <pre id="test">
    22 <script type="application/javascript">
    24 /** Test for Bug 537151 **/
    26 SimpleTest.waitForExplicitFinish();
    28 var p = document.getElementById("display");
    29 p.addEventListener("transitionend", listener, false);
    30 var ignored = getComputedStyle(p, "").marginLeft;
    31 p.style.marginLeft = "150px";
    33 var event_count = 0;
    34 function listener(event)
    35 {
    36   ++event_count;
    37   setTimeout(finish, 400);
    38   p.style.color = "blue";
    39 }
    41 function finish()
    42 {
    43   is(event_count, 1, "should have gotten only 1 transitionend event");
    44   SimpleTest.finish();
    45 }
    47 </script>
    48 </pre>
    49 </body>
    50 </html>

mercurial