|
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"> |
|
11 |
|
12 #display { |
|
13 transition: margin-left 200ms; |
|
14 } |
|
15 |
|
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"> |
|
23 |
|
24 /** Test for Bug 537151 **/ |
|
25 |
|
26 SimpleTest.waitForExplicitFinish(); |
|
27 |
|
28 var p = document.getElementById("display"); |
|
29 p.addEventListener("transitionend", listener, false); |
|
30 var ignored = getComputedStyle(p, "").marginLeft; |
|
31 p.style.marginLeft = "150px"; |
|
32 |
|
33 var event_count = 0; |
|
34 function listener(event) |
|
35 { |
|
36 ++event_count; |
|
37 setTimeout(finish, 400); |
|
38 p.style.color = "blue"; |
|
39 } |
|
40 |
|
41 function finish() |
|
42 { |
|
43 is(event_count, 1, "should have gotten only 1 transitionend event"); |
|
44 SimpleTest.finish(); |
|
45 } |
|
46 |
|
47 </script> |
|
48 </pre> |
|
49 </body> |
|
50 </html> |