Negative radii in radial gradients should be rejected.
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / compat / webkit-radial-gradient-radii.html
1 <!DOCTYPE html>
2 <link rel="help" href="https://compat.spec.whatwg.org/#css-gradients-webkit-radial-gradient">
3 <link rel="help" href="https://www.w3.org/TR/css3-images/#radial-gradients">
4 <meta name="assert" content="Negative radii values are invalid.">
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 <script>
8 test(function() {
9     assert_true(CSS.supports("background-image", "-webkit-radial-gradient(1px 2px, 3% 4%, red, blue)"));
10 }, '-webkit-radial-gradient accepts positive radii.');
11
12 test(function() {
13     assert_true(CSS.supports("background-image", "-webkit-radial-gradient(1px 2px, 0% 4%, red, blue)"));
14 }, '-webkit-radial-gradient accepts zero radii.');
15
16 test(function() {
17     assert_false(CSS.supports("background-image", "-webkit-radial-gradient(1px 2px, -3% 4%, red, blue)"));
18     assert_false(CSS.supports("background-image", "-webkit-radial-gradient(1px 2px, 3% -4%, red, blue)"));
19     assert_false(CSS.supports("background-image", "-webkit-radial-gradient(1px 2px, -3% -4%, red, blue)"));
20 }, '-webkit-radial-gradient rejects negative radii.');
21 </script>