Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: third_party/WebKit/LayoutTests/web-animations-api/animation-update-effect.html

Issue 2140793003: Split timeline-updates-players test into two, update uses of Animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update help link Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/web-animations-api/animation-update-effect.html
diff --git a/third_party/WebKit/LayoutTests/web-animations-api/animation-update-effect.html b/third_party/WebKit/LayoutTests/web-animations-api/animation-update-effect.html
new file mode 100644
index 0000000000000000000000000000000000000000..56acf2d9484baee02a1243d6c3ba174236eaf6a5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/web-animations-api/animation-update-effect.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Element style is updated when the Animation's effect is update</title>
+<link rel="help" href="http://w3c.github.io/web-animations/#set-the-target-effect-of-an-animation">
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<div id='element'></div>
+
+<script>
+var element = document.getElementById('element');
+
+test(function() {
+ var animation = element.animate([{left: '0px'}, {left: '100px'}], 10);
+ assert_equals(getComputedStyle(element).left, '0px');
+
+ var effect = animation.effect
+ animation.effect = null;
+ assert_equals(getComputedStyle(element).left, 'auto');
+
+ animation.effect = effect;
+ assert_equals(getComputedStyle(element).left, '0px');
+}, 'Element style updated after clear and set effect');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698