mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Reject invalid AnimationEffect duration string values
This commit is contained in:
parent
3e221fbb2d
commit
1965943026
Notes:
sideshowbarker
2024-07-17 11:29:41 +09:00
Author: https://github.com/mattco98
Commit: 1965943026
Pull-request: https://github.com/SerenityOS/serenity/pull/24474
3 changed files with 14 additions and 1 deletions
|
@ -18,11 +18,13 @@
|
|||
checkException('KeyframeEffect with infinite endDelay value', () => new KeyframeEffect(null, null, { endDelay: Infinity }));
|
||||
checkException('KeyframeEffect with NaN endDelay value', () => new KeyframeEffect(null, null, { endDelay: NaN }));
|
||||
checkException('KeyframeEffect with NaN iterations', () => new KeyframeEffect(null, null, { iterations: NaN }));
|
||||
checkException('KeyframeEffect with non-"auto" string duration', () => new KeyframeEffect(null, null, { duration: 'abc' }))
|
||||
|
||||
// Test valid values
|
||||
checkException('KeyframeEffect with infinite options value', () => new KeyframeEffect(null, null, Infinity));
|
||||
checkException('KeyframeEffect with finite options value', () => new KeyframeEffect(null, null, 1234.5));
|
||||
checkException('KeyframeEffect with infinite iterations', () => new KeyframeEffect(null, null, { iterations: Infinity }));
|
||||
checkException('KeyframeEffect with infinite duration', () => new KeyframeEffect(null, null, { duration: Infinity }));
|
||||
checkException('KeyframeEffect with "auto" string duration', () => new KeyframeEffect(null, null, { duration: 'auto' }))
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue