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

Side by Side Diff: LayoutTests/web-animations-api/animations-responsive-textIndent.html

Issue 273683005: Web Animations API: Deferred computation of interpolated values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing test file Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4
5 <div id='container'> 4 <div id='container'>
6 <div id='element'></div> 5 <div id='element'></div>
7 </div> 6 </div>
8
9 <script> 7 <script>
10 8
11 var container = document.getElementById('container'); 9 var container = document.getElementById('container');
12 var element = document.getElementById('element'); 10 var element = document.getElementById('element');
13 11
14 var keyframes = [
15 {fontSize: 'inherit', offset: 0},
16 {fontSize: '20px', offset: 1}
17 ];
18
19 test(function() { 12 test(function() {
20 container.style.fontSize = '10px'; 13 container.style.fontSize = '10px';
14
15 var keyframes = [
16 {textIndent: '10em hanging', offset: 0},
17 {textIndent: '10em hanging', offset: 1}
18 ];
21 var player = element.animate(keyframes, 10); 19 var player = element.animate(keyframes, 10);
22 player.pause(); 20 player.pause();
23 player.currentTime = 5; 21 player.currentTime = 5;
24 container.style.fontSize = '30px'; 22
25 assert_equals(getComputedStyle(element).fontSize, '25px'); 23 var textIndent = getComputedStyle(element).textIndent;
26 }, 'Font size responsive to inherited changes'); 24 container.style.fontSize = '20px';
25 assert_not_equals(getComputedStyle(element).textIndent, textIndent);
26 }, 'textIndent responsive to style changes');
27 27
28 </script> 28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698