mirror of
https://github.com/servo/servo.git
synced 2025-09-05 20:48:22 +01:00
animation-iteration-count property is a number instead of integer.
This commit is contained in:
parent
16b0da5004
commit
f78cd2caf1
4 changed files with 31 additions and 8 deletions
21
tests/unit/style/parsing/animation.rs
Normal file
21
tests/unit/style/parsing/animation.rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::Parser;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use parsing::parse;
|
||||
use style::parser::{Parse, ParserContext};
|
||||
use style::properties::longhands::animation_iteration_count::computed_value::AnimationIterationCount;
|
||||
use style::stylesheets::Origin;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[test]
|
||||
fn test_animation_iteration() {
|
||||
assert_roundtrip_with_context!(AnimationIterationCount::parse, "0", "0");
|
||||
assert_roundtrip_with_context!(AnimationIterationCount::parse, "0.1", "0.1");
|
||||
assert_roundtrip_with_context!(AnimationIterationCount::parse, "infinite", "infinite");
|
||||
|
||||
// Negative numbers are invalid
|
||||
assert!(parse(AnimationIterationCount::parse, "-1").is_err());
|
||||
}
|
|
@ -47,6 +47,7 @@ macro_rules! parse_longhand {
|
|||
}};
|
||||
}
|
||||
|
||||
mod animation;
|
||||
mod background;
|
||||
mod basic_shape;
|
||||
mod border;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue