|
| 1 | +from tests.bidi import get_invalid_cases |
| 2 | + |
1 | 3 | MEDIA_FEATURE_NAMES_AND_SAMPLE_VALUES = [ |
2 | | - ("any-hover", "none"), |
3 | | - ("any-hover", "hover"), |
4 | | - ("any-pointer", "none"), |
5 | | - ("any-pointer", "coarse"), |
6 | | - ("any-pointer", "fine"), |
7 | | - ("color", 8), |
8 | | - ("color", 0), |
9 | | - ("color-gamut", "srgb"), |
10 | | - ("color-gamut", "p3"), |
11 | | - ("color-gamut", "rec2020"), |
12 | | - ("color-index", 0), |
13 | | - ("display-mode", "fullscreen"), |
14 | | - ("display-mode", "standalone"), |
15 | | - ("display-mode", "minimal-ui"), |
16 | | - ("display-mode", "browser"), |
17 | | - ("display-mode", "picture-in-picture"), |
18 | | - ("dynamic-range", "standard"), |
19 | | - ("dynamic-range", "high"), |
20 | | - ("environment-blending", "opaque"), |
21 | | - ("environment-blending", "additive"), |
22 | | - ("environment-blending", "subtractive"), |
23 | | - ("forced-colors", "none"), |
24 | | - ("forced-colors", "active"), |
25 | | - ("grid", 0), |
26 | | - ("grid", 1), |
27 | | - ("horizontal-viewport-segments", 1), |
28 | | - ("hover", "none"), |
29 | | - ("hover", "hover"), |
30 | | - ("inverted-colors", "none"), |
31 | | - ("inverted-colors", "inverted"), |
32 | | - ("monochrome", 0), |
33 | | - ("nav-controls", "none"), |
34 | | - ("nav-controls", "back"), |
35 | | - ("overflow-block", "none"), |
36 | | - ("overflow-block", "scroll"), |
37 | | - ("overflow-block", "optional-paged"), |
38 | | - ("overflow-block", "paged"), |
39 | | - ("overflow-inline", "none"), |
40 | | - ("overflow-inline", "scroll"), |
41 | | - ("pointer", "none"), |
42 | | - ("pointer", "coarse"), |
43 | | - ("pointer", "fine"), |
44 | | - ("prefers-color-scheme", "light"), |
45 | | - ("prefers-color-scheme", "dark"), |
46 | | - ("prefers-contrast", "no-preference"), |
47 | | - ("prefers-contrast", "more"), |
48 | | - ("prefers-contrast", "less"), |
49 | | - ("prefers-contrast", "custom"), |
50 | | - ("prefers-reduced-data", "no-preference"), |
51 | | - ("prefers-reduced-data", "reduce"), |
52 | | - ("prefers-reduced-motion", "no-preference"), |
53 | | - ("prefers-reduced-motion", "reduce"), |
54 | | - ("prefers-reduced-transparency", "no-preference"), |
55 | | - ("prefers-reduced-transparency", "reduce"), |
56 | | - ("scan", "interlace"), |
57 | | - ("scan", "progressive"), |
58 | | - ("scripting", "none"), |
59 | | - ("scripting", "initial-only"), |
60 | | - ("scripting", "enabled"), |
61 | | - ("update", "none"), |
62 | | - ("update", "slow"), |
63 | | - ("update", "fast"), |
64 | | - ("vertical-viewport-segments", 1), |
65 | | - ("video-color-gamut", "srgb"), |
66 | | - ("video-color-gamut", "p3"), |
67 | | - ("video-color-gamut", "rec2020"), |
68 | | - ("video-dynamic-range", "standard"), |
69 | | - ("video-dynamic-range", "high"), |
| 4 | + ( |
| 5 | + "any-hover", |
| 6 | + ["none", "hover"], |
| 7 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 8 | + ), |
| 9 | + ( |
| 10 | + "any-pointer", |
| 11 | + ["none", "coarse", "fine"], |
| 12 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 13 | + ), |
| 14 | + ( |
| 15 | + "color", |
| 16 | + [0, 8], |
| 17 | + [-1] + get_invalid_cases("number", nullable=True), |
| 18 | + ), |
| 19 | + ( |
| 20 | + "color-gamut", |
| 21 | + ["srgb", "p3", "rec2020"], |
| 22 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 23 | + ), |
| 24 | + ( |
| 25 | + "color-index", |
| 26 | + [0, 1], |
| 27 | + [-1] + get_invalid_cases("number", nullable=True),, |
| 28 | + ), |
| 29 | + ( |
| 30 | + "display-mode", |
| 31 | + ["fullscreen", "standalone", "minimal-ui", "browser", "picture-in-picture"], |
| 32 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 33 | + ), |
| 34 | + ( |
| 35 | + "dynamic-range", |
| 36 | + ["standard", "high"], |
| 37 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 38 | + ), |
| 39 | + ( |
| 40 | + "environment-blending", |
| 41 | + ["opaque", "additive", "subtractive"], |
| 42 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 43 | + ), |
| 44 | + ( |
| 45 | + "forced-colors", |
| 46 | + ["none", "active"], |
| 47 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 48 | + ), |
| 49 | + ( |
| 50 | + "grid", |
| 51 | + [0, 1], |
| 52 | + [-1] + get_invalid_cases("number", nullable=True),, |
| 53 | + ), |
| 54 | + ( |
| 55 | + "horizontal-viewport-segments", |
| 56 | + [1, 2], |
| 57 | + [-1] + get_invalid_cases("number", nullable=True),, |
| 58 | + ), |
| 59 | + ( |
| 60 | + "hover", |
| 61 | + ["none", "hover"], |
| 62 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 63 | + ), |
| 64 | + ( |
| 65 | + "inverted-colors", |
| 66 | + ["none", "inverted"], |
| 67 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 68 | + ), |
| 69 | + ( |
| 70 | + "monochrome", |
| 71 | + [0, 1], |
| 72 | + [-1] + get_invalid_cases("number", nullable=True),, |
| 73 | + ), |
| 74 | + ( |
| 75 | + "nav-controls", |
| 76 | + ["none", "back"], |
| 77 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 78 | + ), |
| 79 | + ( |
| 80 | + "overflow-block", |
| 81 | + ["none", "scroll", "optional-paged", "paged"], |
| 82 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 83 | + ), |
| 84 | + ( |
| 85 | + "overflow-inline", |
| 86 | + ["none", "scroll"], |
| 87 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 88 | + ), |
| 89 | + ( |
| 90 | + "pointer", |
| 91 | + ["none", "coarse", "fine"], |
| 92 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 93 | + ), |
| 94 | + ( |
| 95 | + "prefers-color-scheme", |
| 96 | + ["light", "dark"], |
| 97 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 98 | + ), |
| 99 | + ( |
| 100 | + "prefers-contrast", |
| 101 | + ["no-preference", "more", "less", "custom"], |
| 102 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 103 | + ), |
| 104 | + ( |
| 105 | + "prefers-reduced-data", |
| 106 | + ["no-preference", "reduce"], |
| 107 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 108 | + ), |
| 109 | + ( |
| 110 | + "prefers-reduced-motion", |
| 111 | + ["no-preference", "reduce"], |
| 112 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 113 | + ), |
| 114 | + ( |
| 115 | + "prefers-reduced-transparency", |
| 116 | + ["no-preference", "reduce"], |
| 117 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 118 | + ), |
| 119 | + ( |
| 120 | + "scan", |
| 121 | + ["interlace", "progressive"], |
| 122 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 123 | + ), |
| 124 | + ( |
| 125 | + "scripting", |
| 126 | + ["none", "initial-only", "enabled"], |
| 127 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 128 | + ), |
| 129 | + ( |
| 130 | + "update", |
| 131 | + ["none", "slow", "fast"], |
| 132 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 133 | + ), |
| 134 | + ( |
| 135 | + "vertical-viewport-segments", |
| 136 | + [1, 2], |
| 137 | + [-1] + get_invalid_cases("number", nullable=True),, |
| 138 | + ), |
| 139 | + ( |
| 140 | + "video-color-gamut", |
| 141 | + ["srgb", "p3", "rec2020"], |
| 142 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 143 | + ), |
| 144 | + ( |
| 145 | + "video-dynamic-range", |
| 146 | + ["standard", "high"], |
| 147 | + ["invalid value"] + get_invalid_cases("string", nullable=True), |
| 148 | + ), |
70 | 149 | ] |
| 150 | + |
0 commit comments