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

Unified Diff: third_party/WebKit/LayoutTests/animations/element-animate-iterable-keyframes.html

Issue 2334123002: Web Animations: Support iterator protocol in property indexed keyframe values (Closed)
Patch Set: Add missing null check Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/unstringable-keyframe-value-crash.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/element-animate-iterable-keyframes.html
diff --git a/third_party/WebKit/LayoutTests/animations/element-animate-iterable-keyframes.html b/third_party/WebKit/LayoutTests/animations/element-animate-iterable-keyframes.html
index 09d9a279f08ac8745af7b134c9f87fcaff2d4410..a4c43ffdac98bb630318dd0f74ddc8dc847f7a3d 100644
--- a/third_party/WebKit/LayoutTests/animations/element-animate-iterable-keyframes.html
+++ b/third_party/WebKit/LayoutTests/animations/element-animate-iterable-keyframes.html
@@ -44,6 +44,26 @@ test(() => {
}, 'Custom iterator with basic keyframes.');
test(() => {
+ assertAnimationEffect({
+ keyframes: {
+ left: createIterable([
+ {done: false, value: '100px'},
+ {done: false, value: '300px'},
+ {done: false, value: '200px'},
+ {done: true},
+ ]),
+ },
+ expect: [
+ {at: 0, is: {left: '100px'}},
+ {at: 0.25, is: {left: '200px'}},
+ {at: 0.5, is: {left: '300px'}},
+ {at: 0.75, is: {left: '250px'}},
+ {at: 1, is: {left: '200px'}},
+ ],
+ });
+}, 'Custom iterator in property indexed keyframes.');
+
+test(() => {
var keyframes = createIterable([
{done: false, value: {left: '100px'}},
{done: false, value: {left: '300px'}},
@@ -125,4 +145,18 @@ test(() => {
});
});
}, 'Custom iterator with value list in keyframe should throw.');
+
+test(() => {
+ assert_throws({name: 'TypeError'}, () => {
+ assertAnimationEffect({
+ keyframes: {
+ left: createIterable([
+ {done: false, value: {toString: null}},
+ {done: true},
+ ]),
+ },
+ expect: [],
+ });
+ });
+}, 'Custom iterator in property indexed keyframes with null toString method should throw.');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/unstringable-keyframe-value-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698