mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Fix unit tests
This commit is contained in:
parent
ed806efade
commit
ca85221525
5 changed files with 69 additions and 46 deletions
|
@ -688,11 +688,12 @@ mod shorthand_serialization {
|
|||
use style::properties::longhands::background_clip as clip;
|
||||
use style::properties::longhands::background_image as image;
|
||||
use style::properties::longhands::background_origin as origin;
|
||||
use style::properties::longhands::background_position as position;
|
||||
use style::properties::longhands::background_position_x as position_x;
|
||||
use style::properties::longhands::background_position_y as position_y;
|
||||
use style::properties::longhands::background_repeat as repeat;
|
||||
use style::properties::longhands::background_size as size;
|
||||
use style::values::specified::Image;
|
||||
use style::values::specified::position::{HorizontalPosition, Position, VerticalPosition};
|
||||
use style::values::specified::position::{HorizontalPosition, VerticalPosition};
|
||||
use super::*;
|
||||
macro_rules! single_vec_value_typedef {
|
||||
($name:ident, $path:expr) => {
|
||||
|
@ -731,16 +732,17 @@ mod shorthand_serialization {
|
|||
authored: None
|
||||
});
|
||||
|
||||
let position = single_vec_value_typedef!(position,
|
||||
Position {
|
||||
horizontal: HorizontalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(7f32))),
|
||||
},
|
||||
vertical: VerticalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(4f32))),
|
||||
},
|
||||
let position_x = single_vec_value_typedef!(position_x,
|
||||
HorizontalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(7f32))),
|
||||
}
|
||||
);
|
||||
|
||||
let position_y = single_vec_value_typedef!(position_y,
|
||||
VerticalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(4f32))),
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -763,7 +765,8 @@ mod shorthand_serialization {
|
|||
let clip = single_vec_keyword_value!(clip, padding_box);
|
||||
|
||||
properties.push(PropertyDeclaration::BackgroundColor(color));
|
||||
properties.push(PropertyDeclaration::BackgroundPosition(position));
|
||||
properties.push(PropertyDeclaration::BackgroundPositionX(position_x));
|
||||
properties.push(PropertyDeclaration::BackgroundPositionY(position_y));
|
||||
properties.push(PropertyDeclaration::BackgroundRepeat(repeat));
|
||||
properties.push(PropertyDeclaration::BackgroundAttachment(attachment));
|
||||
properties.push(PropertyDeclaration::BackgroundImage(image));
|
||||
|
@ -789,16 +792,17 @@ mod shorthand_serialization {
|
|||
authored: None
|
||||
});
|
||||
|
||||
let position = single_vec_value_typedef!(position,
|
||||
Position {
|
||||
horizontal: HorizontalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(7f32))),
|
||||
},
|
||||
vertical: VerticalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(4f32))),
|
||||
},
|
||||
let position_x = single_vec_value_typedef!(position_x,
|
||||
HorizontalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(7f32))),
|
||||
}
|
||||
);
|
||||
|
||||
let position_y = single_vec_value_typedef!(position_y,
|
||||
VerticalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(4f32))),
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -821,7 +825,8 @@ mod shorthand_serialization {
|
|||
let clip = single_vec_keyword_value!(clip, padding_box);
|
||||
|
||||
properties.push(PropertyDeclaration::BackgroundColor(color));
|
||||
properties.push(PropertyDeclaration::BackgroundPosition(position));
|
||||
properties.push(PropertyDeclaration::BackgroundPositionX(position_x));
|
||||
properties.push(PropertyDeclaration::BackgroundPositionY(position_y));
|
||||
properties.push(PropertyDeclaration::BackgroundRepeat(repeat));
|
||||
properties.push(PropertyDeclaration::BackgroundAttachment(attachment));
|
||||
properties.push(PropertyDeclaration::BackgroundImage(image));
|
||||
|
@ -846,16 +851,17 @@ mod shorthand_serialization {
|
|||
authored: None
|
||||
});
|
||||
|
||||
let position = single_vec_value_typedef!(position,
|
||||
Position {
|
||||
horizontal: HorizontalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(0f32))),
|
||||
},
|
||||
vertical: VerticalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(0f32))),
|
||||
},
|
||||
let position_x = single_vec_value_typedef!(position_x,
|
||||
HorizontalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(0f32))),
|
||||
}
|
||||
);
|
||||
|
||||
let position_y = single_vec_value_typedef!(position_y,
|
||||
VerticalPosition {
|
||||
keyword: None,
|
||||
position: Some(LengthOrPercentage::Length(Length::from_px(0f32))),
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -870,7 +876,8 @@ mod shorthand_serialization {
|
|||
let clip = DeclaredValue::Initial;
|
||||
|
||||
properties.push(PropertyDeclaration::BackgroundColor(color));
|
||||
properties.push(PropertyDeclaration::BackgroundPosition(position));
|
||||
properties.push(PropertyDeclaration::BackgroundPositionX(position_x));
|
||||
properties.push(PropertyDeclaration::BackgroundPositionY(position_y));
|
||||
properties.push(PropertyDeclaration::BackgroundRepeat(repeat));
|
||||
properties.push(PropertyDeclaration::BackgroundAttachment(attachment));
|
||||
properties.push(PropertyDeclaration::BackgroundImage(image));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue