Skip to content

Commit

Permalink
[css-color-4] fix incorrect copy/paste from #39137 (#39174)
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke authored Mar 24, 2023
1 parent 926fe41 commit 7c9c76e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions css/css-color/parsing/color-computed-color-function.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
test_computed_value("color", `color(${colorSpace} none none none / 0.5)`, `color(${colorSpace} none none none / 0.5)`);
test_computed_value("color", `color(${colorSpace} 0 0 0 / none)`, `color(${colorSpace} 0 0 0 / none)`);

test_computed_value("color", `color(${colorSpace} calc(NaN) 0 0 / none)`, `color(${colorSpace} 0 0 0)`);
test_computed_value("color", `color(${colorSpace} calc(0 / 0) 0 0 / none)`, `color(${colorSpace} 0 0 0)`);
test_computed_value("color", `color(${colorSpace} calc(NaN) 0 0)`, `color(${colorSpace} 0 0 0)`);
test_computed_value("color", `color(${colorSpace} calc(0 / 0) 0 0)`, `color(${colorSpace} 0 0 0)`);
}

for (const colorSpace of [ "xyz", "xyz-d50", "xyz-d65" ]) {
Expand Down Expand Up @@ -76,8 +76,8 @@
test_computed_value("color", `color(${colorSpace} none none none / 0.5)`, `color(${resultColorSpace} none none none / 0.5)`);
test_computed_value("color", `color(${colorSpace} 0 0 0 / none)`, `color(${resultColorSpace} 0 0 0 / none)`);

test_computed_value("color", `color(${colorSpace} calc(NaN) 0 0 / none)`, `color(${resultColorSpace} 0 0 0)`);
test_computed_value("color", `color(${colorSpace} calc(0 / 0) 0 0 / none)`, `color(${resultColorSpace} 0 0 0)`);
test_computed_value("color", `color(${colorSpace} calc(NaN) 0 0)`, `color(${resultColorSpace} 0 0 0)`);
test_computed_value("color", `color(${colorSpace} calc(0 / 0) 0 0)`, `color(${resultColorSpace} 0 0 0)`);
}

// Opaque sRGB in color()
Expand Down
8 changes: 4 additions & 4 deletions css/css-color/parsing/color-valid-color-function.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@

test_valid_value("color", `color(${colorSpace} 0 calc(infinity) 0)`, `color(${colorSpace} 0 calc(infinity) 0)`);
test_valid_value("color", `color(${colorSpace} 0 calc(-infinity) 0)`, `color(${colorSpace} 0 calc(-infinity) 0)`);
test_valid_value("color", `color(${colorSpace} calc(NaN) 0 0 / none)`, `color(${colorSpace} calc(NaN) 0 0)`);
test_valid_value("color", `color(${colorSpace} calc(0 / 0) 0 0 / none)`, `color(${colorSpace} calc(NaN) 0 0)`);
test_valid_value("color", `color(${colorSpace} calc(NaN) 0 0)`, `color(${colorSpace} calc(NaN) 0 0)`);
test_valid_value("color", `color(${colorSpace} calc(0 / 0) 0 0)`, `color(${colorSpace} calc(NaN) 0 0)`);
}

for (const colorSpace of [ "xyz", "xyz-d50", "xyz-d65" ]) {
Expand Down Expand Up @@ -75,8 +75,8 @@

test_valid_value("color", `color(${colorSpace} 0 calc(infinity) 0)`, `color(${colorSpace} 0 calc(infinity) 0)`);
test_valid_value("color", `color(${colorSpace} 0 calc(-infinity) 0)`, `color(${colorSpace} 0 calc(-infinity) 0)`);
test_valid_value("color", `color(${colorSpace} calc(NaN) 0 0 / none)`, `color(${colorSpace} calc(NaN) 0 0)`);
test_valid_value("color", `color(${colorSpace} calc(0 / 0) 0 0 / none)`, `color(${colorSpace} calc(NaN) 0 0)`);
test_valid_value("color", `color(${colorSpace} calc(NaN) 0 0)`, `color(${colorSpace} calc(NaN) 0 0)`);
test_valid_value("color", `color(${colorSpace} calc(0 / 0) 0 0)`, `color(${colorSpace} calc(NaN) 0 0)`);
}
</script>
</body>
Expand Down

0 comments on commit 7c9c76e

Please sign in to comment.