diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/animation/test/css-transitions/file_pseudoElement-get-animations.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/animation/test/css-transitions/file_pseudoElement-get-animations.html')
-rw-r--r-- | dom/animation/test/css-transitions/file_pseudoElement-get-animations.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dom/animation/test/css-transitions/file_pseudoElement-get-animations.html b/dom/animation/test/css-transitions/file_pseudoElement-get-animations.html new file mode 100644 index 000000000..5683a14a1 --- /dev/null +++ b/dom/animation/test/css-transitions/file_pseudoElement-get-animations.html @@ -0,0 +1,45 @@ +<!doctype html> +<meta charset=utf-8> +<script src="../testcommon.js"></script> +<style> +.init::before { + content: ''; + height: 0px; + width: 0px; + opacity: 0; + transition: all 100s; +} +.change::before { + height: 100px; + width: 100px; + opacity: 1; +} +</style> +<body> +<script> +'use strict'; + +test(function(t) { + var div = addDiv(t, { class: 'init' }); + flushComputedStyle(div); + div.classList.add('change'); + + // Sanity checks + assert_equals(document.getAnimations().length, 3, + 'Got expected number of animations on document'); + var pseudoTarget = document.getAnimations()[0].effect.target; + assert_class_string(pseudoTarget, 'CSSPseudoElement', + 'Got pseudo-element target'); + + // Check animations returned from the pseudo element are in correct order + var anims = pseudoTarget.getAnimations(); + assert_equals(anims.length, 3, + 'Got expected number of animations on pseudo-element'); + assert_equals(anims[0].transitionProperty, 'height'); + assert_equals(anims[1].transitionProperty, 'opacity'); + assert_equals(anims[2].transitionProperty, 'width'); +}, 'getAnimations sorts simultaneous transitions by name'); + +done(); +</script> +</body> |