mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Change code for serialization of {box,text}-shadow so blur-radius
can be parsed as non-negavite
This commit is contained in:
parent
4757a9b712
commit
f30537ba2b
2 changed files with 18 additions and 15 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
use cssparser::Parser;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use parsing::parse;
|
||||
use servo_url::ServoUrl;
|
||||
use style::parser::ParserContext;
|
||||
use style::properties::longhands::{self, perspective_origin, transform_origin};
|
||||
|
@ -106,3 +107,11 @@ fn test_parse_factor() {
|
|||
assert!(parse(filter::parse, "sepia(-1)").is_err());
|
||||
assert!(parse(filter::parse, "saturate(-1)").is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn blur_radius_should_not_accept_negavite_values() {
|
||||
use style::properties::longhands::box_shadow;
|
||||
assert!(parse(box_shadow::parse, "1px 1px -1px").is_err());// for -ve values
|
||||
assert!(parse(box_shadow::parse, "1px 1px 0").is_ok());// for zero
|
||||
assert!(parse(box_shadow::parse, "1px 1px 1px").is_ok());// for +ve value
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue