CSSAnimation-animationName.tentative.html (1199B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSSAnimation.animationName</title> 4 <link rel="help" 5 href="https://drafts.csswg.org/css-animations-2/#dom-cssanimation-animationname"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="support/testcommon.js"></script> 9 <style> 10 @keyframes xyz { 11 to { left: 100px } 12 } 13 </style> 14 <div id="log"></div> 15 <script> 16 'use strict'; 17 18 test(t => { 19 const div = addDiv(t); 20 div.style.animation = 'xyz 100s'; 21 assert_equals(div.getAnimations()[0].animationName, 'xyz', 22 'Animation name matches keyframes rule name'); 23 }, 'Animation name makes keyframe rule'); 24 25 test(t => { 26 const div = addDiv(t); 27 div.style.animation = 'x\\yz 100s'; 28 assert_equals(div.getAnimations()[0].animationName, 'xyz', 29 'Escaped animation name matches keyframes rule name'); 30 }, 'Escaped animation name'); 31 32 test(t => { 33 const div = addDiv(t); 34 div.style.animation = 'x\\79 z 100s'; 35 assert_equals(div.getAnimations()[0].animationName, 'xyz', 36 'Hex-escaped animation name matches keyframes rule' 37 + ' name'); 38 }, 'Animation name with hex-escape'); 39 40 </script>