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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/animations-responsive-offsetDistance.html

Issue 2841863005: CSS Motion Path: delete implementation of motion-offset property (Closed)
Patch Set: ManualTests Created 3 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
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 <div id='element'></div> 4 <div id='element'></div>
5 <script> 5 <script>
6 6
7 var element = document.getElementById('element'); 7 var element = document.getElementById('element');
8 8
9 test(function() { 9 test(function() {
10 var keyframes = [ 10 var keyframes = [
11 {motionOffset: '4%'}, 11 {offsetDistance: '4%'},
12 {motionOffset: '12%'} 12 {offsetDistance: '12%'}
13 ]; 13 ];
14 14
15 element.style.width = '100'; 15 element.style.width = '100';
16 element.style.height = '200'; 16 element.style.height = '200';
17 var player = element.animate(keyframes, 20); 17 var player = element.animate(keyframes, 20);
18 player.pause(); 18 player.pause();
19 player.currentTime = 15; 19 player.currentTime = 15;
20 element.style.width = '300'; 20 element.style.width = '300';
21 element.style.height = '600'; 21 element.style.height = '600';
22 assert_equals(getComputedStyle(element).motionOffset, '10%'); 22 assert_equals(getComputedStyle(element).offsetDistance, '10%');
23 }, 'Motion position percentages are supported'); 23 }, 'Motion position percentages are supported');
24 24
25 test(function() { 25 test(function() {
26 var keyframes = [ 26 var keyframes = [
27 {motionOffset: '8em'}, 27 {offsetDistance: '8em'},
28 {motionOffset: '16em'} 28 {offsetDistance: '16em'}
29 ]; 29 ];
30 30
31 element.style.fontSize = '10px'; 31 element.style.fontSize = '10px';
32 var player = element.animate(keyframes, 20); 32 var player = element.animate(keyframes, 20);
33 player.pause(); 33 player.pause();
34 player.currentTime = 5; 34 player.currentTime = 5;
35 element.style.fontSize = '20px'; 35 element.style.fontSize = '20px';
36 assert_equals(getComputedStyle(element).motionOffset, '200px'); 36 assert_equals(getComputedStyle(element).offsetDistance, '200px');
37 }, 'Motion position lengths respond to style changes'); 37 }, 'Motion position lengths respond to style changes');
38 38
39 </script> 39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698