Auto merge of #13541 - canaltinova:origin-clip, r=Manishearth

Fix origin/clip parsing behavior in mask and background shorthands

<!-- Please describe your changes on the following line: -->
We have tests for mask shorthand parsing, but we don't have tests for background parsing. Should I add some for it?
Also deleted inaccessible match arms in serialization function.
r? @Manishearth

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13466 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13541)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-02 14:33:43 -05:00 committed by GitHub
commit 7da20f2617
4 changed files with 38 additions and 22 deletions

View file

@ -106,8 +106,8 @@ fn mask_shorthand_should_parse_origin_and_clip_correctly() {
let mut parser = Parser::new("padding-box");
let result = mask::parse_value(&context, &mut parser).unwrap();
// TODO(#13466): We should fix origin/clip parsing behavior.
assert_eq!(result.mask_origin.unwrap(), parse_longhand!(mask_origin, "padding-box"));
assert_eq!(result.mask_clip.unwrap(), parse_longhand!(mask_clip, "padding-box"));
}
#[test]

View file

@ -1,5 +0,0 @@
[background-335.htm]
type: testharness
[background_specified_box_one_clip]
expected: FAIL