diff --git a/tests/unit/style/parsing/animation.rs b/tests/unit/style/parsing/animation.rs index 3db81be6484..936d6c644f7 100644 --- a/tests/unit/style/parsing/animation.rs +++ b/tests/unit/style/parsing/animation.rs @@ -7,6 +7,7 @@ use servo_atoms::Atom; use style::parser::Parse; use style::properties::longhands::animation_iteration_count::single_value::computed_value::T as AnimationIterationCount; use style::properties::longhands::animation_name; +use style::values::CustomIdent; use style_traits::ToCss; #[test] @@ -14,13 +15,13 @@ 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!(""))])); + animation_name::SpecifiedValue(vec![SingleValue(CustomIdent(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())])); + vec![SingleValue(CustomIdent(other_name.clone())), + SingleValue(CustomIdent(atom!(""))), + SingleValue(CustomIdent(other_name.clone())), + SingleValue(CustomIdent(other_name.clone()))])); } #[test] diff --git a/tests/unit/style/properties/serialization.rs b/tests/unit/style/properties/serialization.rs index aeb07f87484..fea8d3f416e 100644 --- a/tests/unit/style/properties/serialization.rs +++ b/tests/unit/style/properties/serialization.rs @@ -8,6 +8,7 @@ use style::properties::{PropertyDeclaration, Importance, PropertyId}; use style::properties::longhands::outline_color::computed_value::T as ComputedColor; use style::properties::parse_property_declaration_list; use style::values::{RGBA, Auto}; +use style::values::CustomIdent; use style::values::specified::{BorderStyle, BorderWidth, CSSColor, Length, NoCalcLength}; use style::values::specified::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrAutoOrContent}; use style::values::specified::url::SpecifiedUrl; @@ -1259,8 +1260,8 @@ mod shorthand_serialization { fn counter_increment_with_properties_should_serialize_correctly() { let mut properties = Vec::new(); - properties.push(("counter1".to_owned(), Integer::new(1))); - properties.push(("counter2".to_owned(), Integer::new(-4))); + properties.push((CustomIdent("counter1".into()), Integer::new(1))); + properties.push((CustomIdent("counter2".into()), Integer::new(-4))); let counter_increment = CounterIncrement(properties); let counter_increment_css = "counter1 1 counter2 -4"; diff --git a/tests/unit/style/stylesheets.rs b/tests/unit/style/stylesheets.rs index 8005139e676..9a56ee80d53 100644 --- a/tests/unit/style/stylesheets.rs +++ b/tests/unit/style/stylesheets.rs @@ -23,6 +23,7 @@ use style::properties::longhands::animation_play_state; use style::shared_lock::SharedRwLock; use style::stylesheets::{Origin, Namespaces}; use style::stylesheets::{Stylesheet, NamespaceRule, CssRule, CssRules, StyleRule, KeyframesRule}; +use style::values::CustomIdent; use style::values::specified::{LengthOrPercentageOrAuto, Percentage}; pub fn block_from(iterable: I) -> PropertyDeclarationBlock @@ -221,7 +222,7 @@ fn test_parse_stylesheet() { ]))), }))), CssRule::Keyframes(Arc::new(stylesheet.shared_lock.wrap(KeyframesRule { - name: "foo".into(), + name: CustomIdent("foo".into()), keyframes: vec![ Arc::new(stylesheet.shared_lock.wrap(Keyframe { selector: KeyframeSelector::new_for_unit_testing(