aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/style/parsing/animation.rs
diff options
context:
space:
mode:
authorXidorn Quan <me@upsuper.org>2017-03-06 22:00:04 +1100
committerXidorn Quan <me@upsuper.org>2017-03-06 22:00:04 +1100
commit6273fa03052bd2c380fce673792f6f5f2ae8b536 (patch)
tree9cc87feb3a41f3d34116216cbfaf006dc30bb3aa /tests/unit/style/parsing/animation.rs
parent4bc0cac395e0b74782b13339e962574a5ceca128 (diff)
downloadservo-6273fa03052bd2c380fce673792f6f5f2ae8b536.tar.gz
servo-6273fa03052bd2c380fce673792f6f5f2ae8b536.zip
Make animation-name parse none
Diffstat (limited to 'tests/unit/style/parsing/animation.rs')
-rw-r--r--tests/unit/style/parsing/animation.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/style/parsing/animation.rs b/tests/unit/style/parsing/animation.rs
index ed746790920..bf9f3b3e2ee 100644
--- a/tests/unit/style/parsing/animation.rs
+++ b/tests/unit/style/parsing/animation.rs
@@ -5,12 +5,28 @@
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");
assert_roundtrip_with_context!(AnimationIterationCount::parse, "0.1", "0.1");