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

Side by Side Diff: LayoutTests/web-animations-api/element-animate-list-of-keyframes.html

Issue 203463009: Web Animations API: Fix Synthetic keyframes + partial keyframes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Return nullptr after exception + fixmes Created 6 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/web-animations-api/partial-keyframes.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4
5 <style> 5 <style>
6 .anim { 6 .anim {
7 position: absolute; 7 position: absolute;
8 left: 10px; 8 left: 10px;
9 height: 90px; 9 height: 90px;
10 width: 100px; 10 width: 100px;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 var player = e2.animate([ 44 var player = e2.animate([
45 {backgroundColor: 'green', offset: 0}, 45 {backgroundColor: 'green', offset: 0},
46 {backgroundColor: 'purple', offset: 1} 46 {backgroundColor: 'purple', offset: 1}
47 ], durationValue); 47 ], durationValue);
48 player.pause(); 48 player.pause();
49 player.currentTime = durationValue / 2; 49 player.currentTime = durationValue / 2;
50 assert_equals(e2Style.backgroundColor, 'rgb(64, 64, 64)'); 50 assert_equals(e2Style.backgroundColor, 'rgb(64, 64, 64)');
51 }, 'Calling animate() should start an animation. CamelCase property names should be parsed.'); 51 }, 'Calling animate() should start an animation. CamelCase property names should be parsed.');
52 52
53 var keyframesWithInvalid = [ 53 var keyframesWithInvalid = [
54 {offset: 0.1}, 54 {width: '0px', backgroundColor: 'octarine', offset: 0},
55 {width: '0px', backgroundColor: 'octarine', offset: 0.2}, 55 {width: '1000px', foo: 'bar', offset: 1}];
56 {width: '1000px', foo: 'bar', offset: 1}
57 ];
58 56
59 test(function() { 57 test(function() {
60 var player = e3.animate(keyframesWithInvalid, {duration: durationValue, fill : 'forwards'}); 58 var player = e3.animate(keyframesWithInvalid, {duration: durationValue, fill : 'forwards'});
61 player.pause(); 59 player.pause();
62 player.currentTime = durationValue; 60 player.currentTime = durationValue;
63 assert_equals(e3Style.width, '1000px'); 61 assert_equals(e3Style.width, '1000px');
64 assert_equals(e3Style.backgroundColor, 'rgb(0, 0, 0)'); 62 assert_equals(e3Style.backgroundColor, 'rgb(0, 0, 0)');
65 assert_equals(e3Style.foo, undefined); 63 assert_equals(e3Style.foo, undefined);
66 }, 'Calling animate() with a pre-constructed keyframes list should start an anim ation. Invalid style declarations should be ignored.'); 64 }, 'Calling animate() with a pre-constructed keyframes list should start an anim ation. Invalid style declarations should be ignored.');
67 </script> 65 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/web-animations-api/partial-keyframes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698