servo/tests
bors-servo 72e7f6095e Auto merge of #19330 - Eijebong:sanitize_color, r=KiChjang
Add a sanitize_value implementation for the color input

I had to change the test a little bit to avoid some failures due to
color and text both having a sanitizedValue which was making the test
use the first assertion instead of the second one in some cases.

The sanitize_value implementation is pretty simple, we iterate over the
content and checks that the content is 7 characters long, that the first
character is a `#` and then that all the following characters are
hexadecimal. If all those requirements are met, we lowercase the
content, otherwise we put `#000000` in it.

<!-- 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/19330)
<!-- Reviewable:end -->
2017-11-22 19:42:58 -06:00
..
dromaeo
heartbeats Update heartbeats-simple to 0.4; Include recently added profiler categories in heartbeat logging 2017-02-20 17:17:54 -06:00
html Implement CanvasRenderingContext2d.fillText's "unimplemented" message 2017-08-23 17:34:55 +01:00
jquery
power
unit Replace compiletest suite by doc-tests with compile_fail 2017-11-22 16:25:17 +01:00
wpt Add a sanitize_value implementation for the color input 2017-11-22 22:36:21 +01:00