Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write parse tests for linear gradients #13837

Closed
canova opened this issue Oct 19, 2016 · 5 comments
Closed

Write parse tests for linear gradients #13837

canova opened this issue Oct 19, 2016 · 5 comments

Comments

@canova
Copy link
Member

@canova canova commented Oct 19, 2016

We have parse tests for radial gradients' parsing. Linear gradients are simpler than radial ones and probably require lesser tests.
To add parse tests, you can add a new test function to tests/unit/style/parsing/image.rs and with assert_roundtrip_with_context! macro, compare the left gradient with right parsed ones. Implementation is pretty much same with radials except examples.

Linear gradient examples can be found at: https://drafts.csswg.org/css-images/#funcdef-linear-gradient

To run test you can use ./mach test-unit -p style command.

@highfive
Copy link

@highfive highfive commented Oct 19, 2016

Please make a comment here if you intend to work on this issue. Thank you!

@AVGP
Copy link

@AVGP AVGP commented Oct 21, 2016

I'd like to give this a go :)

@jdm
Copy link
Member

@jdm jdm commented Oct 21, 2016

@AVGP Please do! Ask questions here if anything is unclear!

@jdm jdm added the C-assigned label Oct 21, 2016
@AVGP AVGP mentioned this issue Oct 21, 2016
4 of 5 tasks complete
@AVGP
Copy link

@AVGP AVGP commented Oct 21, 2016

What's up with Travis? Is this DNS-DDoS fallout?

@canova
Copy link
Member Author

@canova canova commented Oct 21, 2016

Yeah, probably because of DNS attack. Also highfive is not working properly.

bors-servo added a commit that referenced this issue Oct 30, 2016
Adds parsing test for linear-gradient

<!-- Please describe your changes on the following line: -->
Tests if `linear-gradient` is correctly parsed without `<side-or-corner>` as well as with `to left` and `to right`.

---
<!-- 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 #13837 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/13886)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants
You can’t perform that action at this time.