Bug 1900530 - Update existing testcases now that a single-stop gradient is valid. r=layout-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D233219
This commit is contained in:
Jonathan Kew
2025-01-06 19:50:26 +00:00
parent 24f94d5353
commit 82f24f8d71
4 changed files with 8 additions and 7 deletions

View File

@@ -0,0 +1 @@
<div style="background: blue; width: 300px; height: 300px;"><br></div>

View File

@@ -31,7 +31,7 @@ fuzzy(0-3,0-89700) == linear-vertical-1d.html linear-vertical-1-ref.html
fuzzy(0-3,0-21070) == linear-vertical-subpixel-1.html linear-vertical-subpixel-1-ref.html
== linear-viewport.html linear-viewport-ref.html
== nostops.html about:blank
== onestop.html about:blank
== onestop.html onestop-ref.html
random-if(winWidget) fuzzy(0-4,0-6000) == radial-1a.html radial-1-ref.html
random-if(winWidget) fuzzy(0-4,0-6000) == radial-1b.html radial-1-ref.html
fuzzy(0-3,0-7860) fuzzy-if(cocoaWidget,0-5,0-89041) == radial-2a.html radial-2-ref.html

View File

@@ -13,8 +13,6 @@
var tests = [
// invalid stops
{ stops: "" , parse: false },
{ stops: "black" , parse: false },
{ stops: "black 0%" , parse: false },
{ stops: "black, 25%" , parse: false },
{ stops: "black, invalid" , parse: false },
{ stops: "black, , white" , parse: false },
@@ -26,6 +24,8 @@
{ stops: "0%, black, white" , parse: false },
// basic stops
{ stops: "black" , parse: true },
{ stops: "black 0%" , parse: true },
{ stops: "black, white" , parse: true },
{ stops: "black 0, white" , parse: true },
{ stops: "black 0%, white" , parse: true },

View File

@@ -221,15 +221,15 @@ function test_gradient_images_parsing() {
'content',
'image-set(url("example.png") 192dpi, linear-gradient(black, white) 1x)'
);
test_valid_value_variants(
'background-image',
"image-set(linear-gradient(red) 1x)"
);
test_invalid_value_variants(
'cursor',
"image-set(linear-gradient(black, white) 1x)"
);
test_invalid_value_variants(
'background-image',
"image-set(linear-gradient(red) 1x)"
);
}
function test_image_type_parsing() {