mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Bug 1264125: Fire transitioncancel event when a transition is canceled (added tests + style clean up)
Issue #55
This commit is contained in:
parent
2243f5248c
commit
5677db4b6e
9 changed files with 679 additions and 287 deletions
|
|
@ -88,11 +88,12 @@ checkReceivedEvents("animationend", targets);
|
|||
|
||||
targets.forEach(div => { div.remove(); });
|
||||
|
||||
// 2. Test CSS Transition event handlers.
|
||||
// 2a. Test CSS Transition event handlers (without transitioncancel)
|
||||
|
||||
var targets = createAndRegisterTargets([ 'ontransitionrun',
|
||||
'ontransitionstart',
|
||||
'ontransitionend' ]);
|
||||
'ontransitionend',
|
||||
'ontransitioncancel' ]);
|
||||
targets.forEach(div => {
|
||||
div.style.transition = 'margin-left 100ms 200ms';
|
||||
getComputedStyle(div).marginLeft; // flush
|
||||
|
|
@ -111,6 +112,31 @@ checkReceivedEvents("transitionend", targets);
|
|||
|
||||
targets.forEach(div => { div.remove(); });
|
||||
|
||||
// 2b. Test CSS Transition cancel event handler.
|
||||
|
||||
var targets = createAndRegisterTargets([ 'ontransitioncancel' ]);
|
||||
targets.forEach(div => {
|
||||
div.style.transition = 'margin-left 100ms 200ms';
|
||||
getComputedStyle(div).marginLeft; // flush
|
||||
div.style.marginLeft = "200px";
|
||||
getComputedStyle(div).marginLeft; // flush
|
||||
});
|
||||
|
||||
advance_clock(200);
|
||||
|
||||
targets.forEach(div => {
|
||||
div.style.display = "none"
|
||||
});
|
||||
getComputedStyle(targets[0]).display; // flush
|
||||
|
||||
advance_clock(0);
|
||||
checkReceivedEvents("transitioncancel", targets);
|
||||
|
||||
advance_clock(100);
|
||||
targets.forEach( div => { is(div.receivedEventType, undefined); });
|
||||
|
||||
targets.forEach(div => { div.remove(); });
|
||||
|
||||
// 3. Test prefixed CSS Animation event handlers.
|
||||
|
||||
var targets = createAndRegisterTargets([ 'onwebkitanimationstart',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue