|
1 | 1 | <!DOCTYPE html> |
| 2 | +<title>text-box parses valid values according to its grammar</title> |
2 | 3 | <link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box"> |
3 | 4 | <script src="/resources/testharness.js"></script> |
4 | 5 | <script src="/resources/testharnessreport.js"></script> |
5 | 6 | <script src="/css/support/parsing-testcommon.js"></script> |
6 | 7 |
|
7 | 8 | <script> |
8 | | -// `normal | <text-box-trim> || <text-box-edge>` |
| 9 | +// initial values |
9 | 10 | test_valid_value('text-box', 'normal'); |
| 11 | +test_valid_value('text-box', 'none', 'normal'); |
| 12 | +test_valid_value('text-box', 'auto', 'normal'); |
| 13 | +test_valid_value('text-box', 'none auto', 'normal'); |
| 14 | +test_valid_value('text-box', 'auto none', 'normal'); |
10 | 15 |
|
11 | 16 | // `<text-box-trim>`: `none | trim-start | trim-end | trim-both` |
12 | | -test_valid_value('text-box', 'none', 'normal'); |
13 | 17 | test_valid_value('text-box', 'trim-start'); |
14 | 18 | test_valid_value('text-box', 'trim-end'); |
15 | 19 | test_valid_value('text-box', 'trim-both'); |
16 | 20 |
|
17 | | -// `<text-box-edge>`: `auto | <text-edge>` |
18 | | -test_valid_value('text-box', 'none auto', 'normal'); |
19 | | -test_valid_value('text-box', 'trim-start auto', 'trim-start'); |
20 | | -test_valid_value('text-box', 'trim-both auto', 'trim-both'); |
21 | | - |
22 | 21 | // `<text-edge>` |
23 | 22 | test_valid_value('text-box', 'text'); |
| 23 | +test_valid_value('text-box', 'cap'); |
| 24 | +test_valid_value('text-box', 'ideographic'); |
24 | 25 | test_valid_value('text-box', 'cap alphabetic'); |
| 26 | +test_valid_value('text-box', 'text alphabetic'); |
| 27 | + |
| 28 | +// Mix initial and non-initial values |
| 29 | +test_valid_value('text-box', 'trim-start auto', 'trim-start'); |
| 30 | +test_valid_value('text-box', 'auto trim-both', 'trim-both'); |
| 31 | +test_valid_value('text-box', 'none text', 'none text'); |
| 32 | +test_valid_value('text-box', 'text text none', 'none text'); |
| 33 | +test_valid_value('text-box', 'none cap', 'none cap'); |
| 34 | +test_valid_value('text-box', 'cap ideographic none', 'none cap ideographic'); |
| 35 | +test_valid_value('text-box', 'ideographic none', 'none ideographic'); |
25 | 36 |
|
26 | 37 | // Both `<text-box-trim>` and `<text-box-edge>` |
27 | 38 | test_valid_value('text-box', 'trim-both text', 'text'); |
28 | 39 | test_valid_value('text-box', 'trim-start text'); |
29 | | -test_valid_value('text-box', 'trim-start cap alphabetic'); |
| 40 | +test_valid_value('text-box', 'text text trim-both', 'text'); |
| 41 | +test_valid_value('text-box', 'text text trim-end', 'trim-end'); |
| 42 | +test_valid_value('text-box', 'cap alphabetic trim-start', 'trim-start cap alphabetic'); |
| 43 | +test_valid_value('text-box', 'trim-both cap alphabetic', 'cap alphabetic'); |
30 | 44 | </script> |
0 commit comments