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

Unified Diff: LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html

Issue 814083003: Update animation when changes in animation keyframes are detected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase + Address comments Created 5 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/animations/keyframes-cssom-updates-animation.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html
diff --git a/LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html b/LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html
new file mode 100644
index 0000000000000000000000000000000000000000..258cf5f80818c03d30e5eb5de5f895c99e9d8798
--- /dev/null
+++ b/LayoutTests/animations/keyframes-cssom-change-name-updates-animation.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<style>
+ @keyframes anim {
+ 0% { left: 100px; }
+ 100% { left: 100px; }
+ }
+
+ #target {
+ animation: anim 1s paused;
+ left: 0px;
+ }
+
+</style>
+<div id="target"></div>
+<script>
+ test(function() {
+ var sheet = document.styleSheets[0];
+ var rules = sheet.rules;
+ var keyframes = rules[0];
+
+ assert_equals(parseInt(getComputedStyle(target).left), 100, 'left offset');
+ keyframes.name = 'foobar';
+ assert_equals(parseInt(getComputedStyle(target).left), 0, 'left offset');
+ keyframes.name = 'anim';
+ assert_equals(parseInt(getComputedStyle(target).left), 100, 'left offset');
+
+ }, "Check that changes to @keyframes name updates the animating element accordingly");
+</script>
« no previous file with comments | « no previous file | LayoutTests/animations/keyframes-cssom-updates-animation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698