background-image-invalid.html (1829B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Backgrounds and Borders Module Level 3: parsing background-image with invalid values</title> 6 <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> 7 <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-image"> 8 <link rel="help" href="https://drafts.csswg.org/css-images/#radial-gradients"> 9 <meta name="assert" content="background-image supports only the grammar '<bg-image>#'."> 10 <meta name="assert" content="Negative radial-gradient radii are invalid."> 11 <script src="/resources/testharness.js"></script> 12 <script src="/resources/testharnessreport.js"></script> 13 <script src="/css/support/parsing-testcommon.js"></script> 14 </head> 15 <body> 16 <script> 17 test_invalid_value("background-image", "none, auto"); 18 19 // Negative radii are invalid. 20 test_invalid_value("background-image", "radial-gradient(circle -10px at center, red, blue)"); 21 test_invalid_value("background-image", "repeating-radial-gradient(-10px at center, red, blue)"); 22 test_invalid_value("background-image", "radial-gradient(ellipse -20px 30px at center, red, blue)"); 23 test_invalid_value("background-image", "repeating-radial-gradient(-20% 30% at center, red, blue)"); 24 test_invalid_value("background-image", "radial-gradient(20px -30px at center, red, blue)"); 25 test_invalid_value("background-image", "repeating-radial-gradient(20px -30px ellipse at center, red, blue)"); 26 27 test_invalid_value("background-image", "cross-fade(auto blue, 50% red)"); 28 test_invalid_value("background-image", "cross-fade(1px red, green)"); 29 test_invalid_value("background-image", "cross-fade(calc(1% + 1px) red, green)"); 30 test_invalid_value("background-image", "cross-fade(-1% red, green)"); 31 test_invalid_value("background-image", "cross-fade(101% red, green)"); 32 </script> 33 </body> 34 </html>