1. Introduction
Tests
The test coverage information in this specification covers wpt/css/css-text/ and subdirectories, as well as those tests in wpt/css/CSS2/ and subdirectories that relate to this specification.
1.1. Module Interactions
Tests
Tests not needed for this section.
1.2. Value Definitions
Tests
Tests not really needed for this section; could possibly test that css-wide keywords apply to every property.
1.3. Languages and Typesetting
Tests
Tests not needed for this section: these are definitions, they get tested through their application, not by themselves.
1.4. Characters and Letters
Tests
For the most part, tests not really needed for this section: these are definitions, they get tested through their applications, by themselves. The few testable assertions that are made have coverage.
Possible additions:
-
turning the content of example 1 into tests (first, check that it’s not already done).
1.5. Text Processing
Tests
This section has adequate coverage. Exhaustive coverage unrealistic, since this section is effectively a dependency on all of Unicode. Some tests nonetheless provided for key functionality (such as the effect of certain control characters on Arabic shaping).
2. Transforming Text
Tests
This section and its subsections have good test coverage overall, and very good i18n coverage in particular.
Missing tests:
-
no test of Animation type.
-
Applies to text
Possible additions:
-
An automated test for plain text copy&paste not applying transforms. Not clear such an automated test is possible, but it would be nice to have one if it were.
2.1. Case Transforms: the text-transform property
2.1.1. Mapping Rules
2.1.2. Order of Operations
3. White Space and Wrapping: the white-space property
Tests
This section has good overall test coverage, particularly through tests for § 4 White Space Processing & Control Characters and subsections.
Missing tests:
-
No test of Animation type
-
Intrinsic (min and max) sizing tests for normal and nowrap.
4. White Space Processing & Control Characters
Tests
This section has reasonably good test coverage.
Missing tests:
-
“As required by Unicode, unsupported Default_ignorable characters must be ignored for text rendering”
4.1. The White Space Processing Rules
Tests
This section has good test coverage, all parts are well exercised. Most tests to be found in subsections.
4.1.1. Phase I: Collapsing and Transformation
Tests
This section has good test coverage, all parts are well exercised.
4.1.2. Phase II: Trimming and Positioning
Tests
This section has good test coverage, all parts are well exercised.
4.1.3. Segment Break Transformation Rules
Tests
This section has reasonable test coverage, though some assertions are only tested indirectly through test for other features that rely on this, rather than by dedicated tests.
4.2. Tab Character Size: the tab-size property
Tests
This section has good test coverage.
Missing test:
-
Applies to text
5. Line Breaking and Word Boundaries
Tests
Tests mostly not needed for this section: these are definitions, they get tested through their application, not by themselves.
Can be a good section to host tests for i18n requirements not covered in detail by the spec.
5.1. Line Breaking Details
Tests
This section has partial test coverage.
Missing tests:
-
For soft wrap opportunities before the first or after the last character of a box, the break occurs immediately before/after the box (at its margin edge) rather than breaking the box between its content edge and the content.
Untestable(?):
-
UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints. […]
5.2. Breaking Rules for Letters: the word-break property
Tests
This section has partial test coverage.
Missing tests:
-
Applies to text
-
No test of Animation type.
-
affects intrinsic sizing (tested for word-break:break-word)
-
treating non-letter typographic character units belonging to the NU, AL, AI, or ID Unicode line breaking classes
-
any typographic character units resolving to the any typographic letter units (and any typographic character units resolving to the
NU
(“numeric”),AL
(“alphabetic”), orSA
(“Southeast Asian”) line breaking classes -
effect of word-break:keep-all on NU and AI classes
-
Symbols that line-break the same way as letters of a particular category are affected the same way as those letters.
-
does not suppress wbr
-
More tests for “does not affect rules governing the soft wrap opportunities created around punctuation
5.3. Line Breaking Strictness: the line-break property
Tests
This section has extensive test coverage for CJK.
Missing tests:
-
applies to text
-
affects intrinsic sizing
Untestable(?):
-
behavior of “auto”
5.4. Hyphenation: the hyphens property
Tests
This section has partial test coverage.
Missing tests:
-
No test of Animation type.
-
Applies to text
-
“Automatic hyphenation opportunities within a word must be ignored if the word contains a conditional hyphen (shy or U+00AD), in favor of the conditional hyphen(s)”
-
“However, if, even after breaking at such opportunities, a portion of that word is still too long to fit on one line, an automatic hyphenation opportunity may be used.”
5.5. Overflow Wrapping: the overflow-wrap/word-wrap property
Tests
This section has fairly good test coverage.
Missing tests:
-
Applies to text
-
No test of Animation type
5.6. Shaping Across Intra-word Breaks
Tests
This section has good test coverage.
6. Alignment and Justification
Tests
Tests only needed in subsections.
6.1. Text Alignment: the text-align shorthand
Tests
This section has partial test coverage.
Missing tests:
-
If (after justification, if any) the inline contents of a line box are too long to fit within it, then the contents are start-aligned: any content that doesn’t fit overflows the line box’s end edge.
-
If the UA chooses to adjust the text, then it must ensure that tab stops continue to line up
-
“Values other than justify-all or match-parent are assigned to text-align-all and reset text-align-last to auto.”, and being a shorthand in general
6.2. Default Text Alignment: the text-align-all property
Tests
This section lacks tests.
6.3. Last Line Alignment: the text-align-last property
Tests
This section has fairly good test coverage: all value combinations for text-align / text-align-last are exercised, except for text-align-last: match-parent (which is exercised, but in a more limited way).
Missing tests:
-
tests for Animation type
6.4. Justification Method: the text-justify property
Tests
This section has light test coverage. All values (other than auto) are tested, but the tests are minimal. Not sure we can do better though.
Missing text:
-
Applies to text
Untestable(?):
-
behavior of auto
6.4.1. Expanding and Compressing Text
Tests
This section lacks tests.
Missing tests:
-
whether a typographic character unit provides a justification opportunity is controlled by the text-justify value of its parent;
-
whether a justification opportunity exists between two consecutive typographic character units is determined by the text-justify value of their nearest common ancestor.
-
UAs must not break required ligatures or otherwise disable features required to correctly shape complex scripts
-
… and maybe more
6.4.2. Handling Symbols and Punctuation
Tests
This section lacks tests. Not sure what is testable though.
6.4.3. Unexpandable Text
Tests
This section has basic test coverage.
Missing tests:
-
Values of text-align-last other than justify
-
A broader range of non-stretchable content that just an empty span with padding
6.4.4. Cursive Scripts
Tests
This section lacks automated tests.
6.4.5. Minimum Requirements for auto Justification
Tests
This section lacks tests.
7. Spacing
Tests
Tests only needed in subsections.
7.1. Word Spacing: the word-spacing property
Tests
This section has limited test coverage.
Missing tests:
-
Applies to text
-
inherit lengths as absolute
-
should be applied half on each side of the character unless otherwise dictated by typographic tradition.
-
doesn’t do anything between words defined by text analysis like in Thai, only on actual word separators
-
works on the Ethiopic word space (U+1361), the Aegean word separators (U+10100,U+10101), the Ugaritic word divider (U+1039F), and the Phoenician Word Separator (U+1091F).
-
word-spacing and bidi
7.2. Tracking: the letter-spacing property
Tests
This section has partial test coverage.
Missing tests:
-
Applies to text
-
Due to issue 1518, some/many tests in this section should be converted from MUST to SHOULD.
-
inherit lengths as absolute
-
For legacy reasons, a computed letter-spacing of zero yields a resolved value (getComputedStyle() return value) of normal.
-
However, ligatures and other font features specified via the low-level font-feature-settings property take precedence over this rule
7.2.1. Cursive Scripts
Tests
This section lacks tests. Not sure automated tests are possible.
7.3. Shaping Across Element Boundaries
Tests
This section has good test coverage.
8. Edge Effects
Tests
Tests only needed in subsections.
8.1. First Line Indentation: the text-indent property
Tests
This section has adequate test coverage.
8.2. Hanging Glyphs
Tests
Test coverage TBD. Partly tested through § 8.2.1 Hanging Punctuation: the hanging-punctuation property partly through § 4.1.2 Phase II: Trimming and Positioning.
8.2.1. Hanging Punctuation: the hanging-punctuation property
Tests
This section has spotty test coverage. All values have tests.
Missing tests:
-
No test of Animation type.
-
Applies to text
-
Affects intrinsic sizing
-
each value has a test, and checks with some characters, but there isn’t a test for every relevant unicode character
-
it is not considered when measuring the line’s contents for […] alignment
-
it is not considered when measuring the line’s contents for […] justification
-
Non-zero inline-axis borders or padding between a hangable mark and the edge of the line prevent the mark from hanging
-
At most one punctuation character may hang at each edge of the line.
-
should be treated as ink overflow
8.3. Bidirectionality and Line Boxes
Tests
This section mostly lacks tests.
Appendix A: Text Processing Order of Operations
Tests
Tests probably not needed for this section, as it is exercised through the rest of the specification.
Appendix B: Conversion to Plaintext
Tests
This section lacks tests.
Appendix C: Default UA Stylesheet
Tests
Tests not needed for this section.
Appendix D: Scripts and Spacing
Tests
Tests not needed for this section: these are definitions, they get tested through their application, not by themselves.
Appendix E: Characters and Properties
Tests
This section lacks tests.
Appendix F: Identifying the Content Writing System
Tests
This section has partial test coverage. Each of the various properties that take the content language into account is tested, except tested on text-justification:auto, but probably not testable anyway.
Missing tests:
-
if the writing system to specified to be one of the Hant, Hans, Hani, Hanb, or Bopo ISO15924 codes, then the writing system is Chinese.
-
if the writing system to specified to be one of the Jpan, Hira ISO15924 codes, then the writing system is Japanese.
-
if the writing system to specified to be one of the Kore, Hang, or Jamo ISO15924 codes, then the writing system is Korean.
Appendix G: Small Kana Mappings
Tests
This section has good test coverage, through the text-transform property.
Privacy Considerations
Tests
Tests not needed for this section.
Security Considerations
Tests
Tests not needed for this section.
Acknowledgements
Tests
Tests not needed for this section.