Index: third_party/WebKit/LayoutTests/web-animations-api/element-animate-no-style-recalc.html |
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/element-animate-no-style-recalc.html b/third_party/WebKit/LayoutTests/web-animations-api/element-animate-no-style-recalc.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3cb3cd33e20bd9baf0b5beca3fe45777de7a8bbb |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/web-animations-api/element-animate-no-style-recalc.html |
@@ -0,0 +1,14 @@ |
+<!DOCTYPE html> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<div id="container"> |
+ <div id="target"></div> |
+</div> |
+<script> |
+test(() => { |
+ internals.updateStyleAndReturnAffectedElementCount(); |
+ container.style.color = 'blue'; |
+ target.animate({color: 'blue'}, {fill: 'forwards'}); |
+ assert_greater_than(internals.updateStyleAndReturnAffectedElementCount(), 1); |
+}, 'Calling element.animate() should not force a style recalc.'); |
+</script> |