1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Color Level 6: Parsing and serialization of colors using invalid color-contrast() function syntax</title>
<link rel="author" title="Sam Weinig" href="mailto:weinig@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-color-6/#colorcontrast">
<link rel="help" href="https://drafts.csswg.org/css-color-6/#resolving-contrast">
<link rel="help" href="https://drafts.csswg.org/css-color-6/#serial-color-contrast">
<meta name="assert" content="invalid color-contrast() values fail to parse">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value('color', `color-contrast(white vs red)`);
test_invalid_value('color', `color-contrast(white vs red,)`);
test_invalid_value('color', `color-contrast(white vs )`);
test_invalid_value('color', `color-contrast(white)`);
test_invalid_value('color', `color-contrast(white vs red green)`);
test_invalid_value('color', `color-contrast(white vs red, green to)`);
test_invalid_value('color', `color-contrast(white vs red, green to invalid)`);
test_invalid_value('color', `color-contrast(white vs red to AA)`);
test_invalid_value('color', `color-contrast(white vs red, green white)`);
test_invalid_value('color', `color-contrast(white vs red, green to AA white)`);
</script>
</body>
</html>
|