3 transition: margin
1s, background
200ms;
7 Tests that transitions don't trigger due to intrinsic margins.
8 <input type=
"submit" value=
"Button"></input>
10 if (window
.testRunner
) {
11 testRunner
.dumpAsText();
12 testRunner
.waitUntilDone();
16 var target
= document
.querySelector('input');
17 var marginBefore
= getComputedStyle(target
).margin
;
19 target
.style
.background
= 'green';
20 // The background transition should finish before any transition on margin.
21 target
.addEventListener('transitionend', function() {
25 var marginAfter
= getComputedStyle(target
).margin
26 document
.body
.textContent
= marginBefore
== marginAfter
?
28 'FAIL: expected [' + marginBefore
+ '] but was [' + marginAfter
+ ']';
29 if (window
.testRunner
) {
30 testRunner
.notifyDone();