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/mozilla/file_spacing_property_order.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/mozilla/file_spacing_property_order.html')
-rw-r--r-- | dom/animation/test/mozilla/file_spacing_property_order.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dom/animation/test/mozilla/file_spacing_property_order.html b/dom/animation/test/mozilla/file_spacing_property_order.html new file mode 100644 index 000000000..1338d6081 --- /dev/null +++ b/dom/animation/test/mozilla/file_spacing_property_order.html @@ -0,0 +1,33 @@ +<!doctype html> +<meta charset=utf-8> +<script src="../testcommon.js"></script> +<body> +<script> +'use strict'; + +test(function(t) { + var div = document.createElement('div'); + document.documentElement.appendChild(div); + var anim = div.animate([ { borderRadius: "0", borderTopRightRadius: "10%" }, + { borderTopLeftRadius: "20%", + borderTopRightRadius: "30%", + borderBottomRightRadius: "40%", + borderBottomLeftRadius: "50%" }, + { borderRadius: "50%" } ], + { spacing:"paced(border-radius)" }); + + var frames = anim.effect.getKeyframes(); + var dist = [ 0, + Math.sqrt(20 * 20 + (30 - 10) * (30 - 10) + 40 * 40 + 50 * 50), + Math.sqrt((50 - 20) * (50 - 20) + (50 - 30) * (50 - 30) + + (50 - 40) * (50 - 40) + (50 - 50) * (50 - 50)) ]; + var cumDist = []; + dist.reduce(function(prev, curr, i) { return cumDist[i] = prev + curr; }, 0); + assert_approx_equals(frames[1].computedOffset, cumDist[1] / cumDist[2], + 0.0001, 'frame offset'); +}, 'Test for the longhand components of the shorthand property surely sorted' ); + +done(); + +</script> +</body> |