mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
fix transform: none serialization
This commit is contained in:
parent
231481570e
commit
cba88f213d
2 changed files with 28 additions and 0 deletions
|
@ -1067,4 +1067,27 @@ mod shorthand_serialization {
|
|||
assert_eq!(s, "mandatory");
|
||||
}
|
||||
}
|
||||
|
||||
mod transform {
|
||||
pub use super::*;
|
||||
|
||||
#[test]
|
||||
fn should_serialize_none_correctly() {
|
||||
use cssparser::Parser;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use style::parser::ParserContext;
|
||||
use style::properties::longhands::transform;
|
||||
use style::stylesheets::Origin;
|
||||
|
||||
let mut s = String::new();
|
||||
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
|
||||
let context = ParserContext::new(Origin::Author, &url, Box::new(CSSErrorReporterTest));
|
||||
|
||||
let parsed = transform::parse(&context, &mut Parser::new("none")).unwrap();
|
||||
let try_serialize = parsed.to_css(&mut s);
|
||||
|
||||
assert_eq!(try_serialize.is_ok(), true);
|
||||
assert_eq!(s, "none");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue