mirror of
https://github.com/servo/servo.git
synced 2025-08-25 07:08:21 +01:00
style: Fix servo build.
This also fixes a bunch of calc handling issues and such. Also remove tests that no longer compile and are covered by WPT.
This commit is contained in:
parent
ca503b4908
commit
4a31509215
17 changed files with 199 additions and 436 deletions
|
@ -4,19 +4,6 @@
|
|||
|
||||
use app_units::Au;
|
||||
use style::attr::{parse_length, AttrValue, LengthOrPercentageOrAuto};
|
||||
use style::values::computed::{CalcLengthOrPercentage, Percentage};
|
||||
|
||||
#[test]
|
||||
fn test_length_calc() {
|
||||
let calc = CalcLengthOrPercentage::new(Au(10).into(), Some(Percentage(0.2)));
|
||||
assert_eq!(calc.to_used_value(Some(Au(10))), Some(Au(12)));
|
||||
assert_eq!(calc.to_used_value(Some(Au(0))), Some(Au(10)));
|
||||
assert_eq!(calc.to_used_value(None), None);
|
||||
|
||||
let calc = CalcLengthOrPercentage::new(Au(10).into(), None);
|
||||
assert_eq!(calc.to_used_value(Some(Au(0))), Some(Au(10)));
|
||||
assert_eq!(calc.to_used_value(None), Some(Au(10)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_double() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue