mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
Add unit tests for step timing function.
This commit is contained in:
parent
99ef3d701a
commit
cad0cd3711
2 changed files with 17 additions and 0 deletions
|
@ -1210,6 +1210,19 @@ mod shorthand_serialization {
|
|||
assert_eq!(serialization, block_text);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn transition_should_serialize_acceptable_step_timing_function() {
|
||||
let block_text = "transition-property: margin-left; \
|
||||
transition-duration: 3s; \
|
||||
transition-delay: 4s; \
|
||||
transition-timing-function: steps(2, start);";
|
||||
let block = parse(|c, i| Ok(parse_property_declaration_list(c, i)), block_text).unwrap();
|
||||
|
||||
let serialization = block.to_css_string();
|
||||
|
||||
assert_eq!(serialization, "transition: margin-left 3s steps(2, start) 4s;");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn transition_should_serialize_acceptable_frames_timing_function() {
|
||||
let block_text = "transition-property: margin-left; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue