Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / animations / keyframes-cssom-updates-compositor-animation.html
blob081be40b4559e6f6bfaf1912071a1af9b741db0f
1 <!doctype html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <style>
5 @keyframes anim {
6 0% { opacity: 1.0; }
7 100% { opacity: 1.0; }
10 #target { animation: anim 2s -1s linear paused; }
11 </style>
12 <div id="target"></div>
13 <script>
14 test(function() {
15 var sheet = document.styleSheets[0];
16 var rules = sheet.rules;
17 var keyframes = rules[0];
19 assert_approx_equals(parseFloat(getComputedStyle(target).opacity), 1.0, 0.001, 'opacity');
20 keyframes.appendRule('50% { opacity: 0.0; }');
21 assert_approx_equals(parseFloat(getComputedStyle(target).opacity), 0.0, 0.001, 'opacity');
23 }, "Check that changes to a compositor animation via CSSOM update it accordingly");
24 </script>