animation-iteration-count property is a number instead of integer.

This commit is contained in:
Hiroyuki Ikezoe 2017-01-05 09:34:22 +09:00
parent 16b0da5004
commit f78cd2caf1
4 changed files with 31 additions and 8 deletions

View 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());
}

View file

@ -47,6 +47,7 @@ macro_rules! parse_longhand {
}};
}
mod animation;
mod background;
mod basic_shape;
mod border;