mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Make animation-name parse none
This commit is contained in:
parent
deb1b0aea6
commit
550c64cbf2
5 changed files with 46 additions and 12 deletions
|
@ -14,7 +14,7 @@ extern crate parking_lot;
|
|||
extern crate rayon;
|
||||
extern crate rustc_serialize;
|
||||
extern crate selectors;
|
||||
extern crate servo_atoms;
|
||||
#[macro_use] extern crate servo_atoms;
|
||||
extern crate servo_config;
|
||||
extern crate servo_url;
|
||||
extern crate style;
|
||||
|
|
|
@ -5,11 +5,27 @@
|
|||
use cssparser::Parser;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use parsing::parse;
|
||||
use servo_atoms::Atom;
|
||||
use style::parser::{Parse, ParserContext};
|
||||
use style::properties::longhands::animation_iteration_count::single_value::computed_value::T as AnimationIterationCount;
|
||||
use style::properties::longhands::animation_name;
|
||||
use style::stylesheets::Origin;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[test]
|
||||
fn test_animation_name() {
|
||||
use self::animation_name::single_value::SpecifiedValue as SingleValue;
|
||||
let other_name = Atom::from("other-name");
|
||||
assert_eq!(parse_longhand!(animation_name, "none"),
|
||||
animation_name::SpecifiedValue(vec![SingleValue(atom!(""))]));
|
||||
assert_eq!(parse_longhand!(animation_name, "other-name, none, 'other-name', \"other-name\""),
|
||||
animation_name::SpecifiedValue(
|
||||
vec![SingleValue(other_name.clone()),
|
||||
SingleValue(atom!("")),
|
||||
SingleValue(other_name.clone()),
|
||||
SingleValue(other_name.clone())]));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_animation_iteration() {
|
||||
assert_roundtrip_with_context!(AnimationIterationCount::parse, "0", "0");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue