Skip to content

Commit 6ffd030

Browse files
committed
Expect correct result for CSS random with step of infinity
The spec states that "In random(A, B, C)... If C is infinite, the result is A." however this test previously expected the result to be NaN, the same as if B was infinite.
1 parent 6d75c23 commit 6ffd030

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

css/css-values/random-computed.tentative.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@
245245
test_random_computed_value(property, 'calc(10 + random(10, infinity))', '0');
246246
test_random_computed_value(property, 'calc(10 + random(10, infinity, 10))', '0');
247247
test_random_computed_value(property, 'calc(10 + random(10, infinity, infinity))', '0');
248-
test_random_computed_value(property, 'random(10, 100, infinity)', '0');
249-
test_random_computed_value(property, 'calc(10 + random(10, 100, infinity))', '0');
248+
test_random_computed_value(property, 'random(10, 100, infinity)', '10');
249+
test_random_computed_value(property, 'calc(10 + random(10, 100, infinity))', '20');
250250
// Negative steps, even infinitely negative steps, are ignored.
251251
test_random_computed_value_in_range(property, 'random(10, 100, -infinity)', '10', '100');
252252
test_random_computed_value_in_range(property, 'calc(10 + random(10, 100, -infinity))', '20', '110');

0 commit comments

Comments
 (0)