Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / animations / keyframes-cssom-prefixed-01.html
blob2f7cda420bf233f474b6c358761364f42e8bef44
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <title>Keyframes test</title>
5 <style type="text/css" media="screen">
6 #box {
7 position: absolute;
8 left: 0;
9 top: 100px;
10 height: 100px;
11 width: 100px;
12 background-color: blue;
13 animation-duration: 1s;
14 animation-timing-function: linear;
15 animation-name: anim;
16 animation-fill-mode: forwards;
18 </style>
19 <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
20 <script type="text/javascript" charset="utf-8">
22 const expectedValues = [
23 // [time, element-id, property, expected-value, tolerance]
24 [1, "box", "left", 300, 1],
26 var lastSheet = document.styleSheets[document.styleSheets.length - 1];
27 lastSheet.insertRule("@-webkit-keyframes anim { from { left: 200px; } to { left: 300px;} }", lastSheet.cssRules.length);
28 runAnimationTest(expectedValues);
29 result += lastSheet.cssRules[lastSheet.cssRules.length - 1].cssText;
30 result += '<br>';
32 </script>
33 </head>
34 <body>
35 This test creates dynamically a prefixed @-webkit-keyframes and verify the output.
36 <div id="box">
37 </div>
38 <div id="result">
39 </div>
40 </body>
41 </html>