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
2.1. Case Transforms: the text-transform property
Tests
This section has 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.1. Mapping Rules
Tests
This section has adequate test coverage.
2.2. Expanding Between Words: the word-space-transform property
Tests
This section has generally good coverage.
Missing tests:
-
no test of Animation type
2.3. Order of Operations
Tests
This section has adequate test coverage.
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, and longhand properties.
Missing tests:
-
No test of Animation type
-
Intrinsic (min and max) sizing tests for normal and nowrap.
-
shorthand to longhand expansion involving white-space-trim values and preserve-spaces
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. White Space Collapsing: the white-space-collapse property
Tests
This section has limited direct coverage, but extensive coverage through the white-space shorthand.
Missing tests:
-
any direct tests as a longhand (other than syntax and inheritance)
-
tests of the preserve-spaces value (direct or indirect)
-
tests of the discard value (direct or indirect)
4.2. White Space Trimming: the white-space-trim property
Tests
This section mostly lacks tests
4.3. The White Space Processing Rules
Tests
This section has good test coverage. Most tests to be found in subsections.
4.3.1. Phase I: Collapsing and Transformation
Tests
This section has good test coverage, most parts are well exercised.
Missing tests:
-
If white-space-collapse is set to preserve-spaces, each tab and segment break is converted to a space.
4.3.2. Phase II: Trimming and Positioning
Tests
This section has good test coverage, all parts are well exercised.
4.3.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.4. Tab Character Size: the tab-size property
Tests
This section has good test coverage.
Missing test:
-
Applies to text
5. Text Wrapping
Tests
Tests mostly not needed for this section: these are definitions, they get tested through their application, not by themselves.
5.1. Deciding Whether to Wrap: the text-wrap-mode property
Tests
This property is tested extensively through its shorthands, but not directly.
Missing test:
-
preserved segment breaks are forced line breaks (probably tested already, but need to find those tests)
-
CR and LF line breaking class are forced line breaks
-
Direct tests of this property as a longhand
5.2. Controlling Breaks Within Boxes: the wrap-inside property
Tests
This section lacks tests.
5.2.1. Example of using 'wrap-inside: avoid' in presenting a footer
Tests
This section does not need tests.
5.3. Controlling Breaks Between Boxes: the wrap-before/wrap-after properties
Tests
This section lacks tests.
5.4. Selecting How to Wrap: the text-wrap-style property
Tests
This property has limited coverage.
Missing test:
-
tests for values other than balance
-
Direct tests of this property as a longhand
5.5. Joint Wrapping Control: the text-wrap shorthand property
Tests
This section has limited coverage.
5.6. 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.
-
Line breaking classes CM and SG must be honored
Untestable(?):
-
UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints. […]
6. Line Breaking and Word Boundaries
Tests
This section deals in generalities rather than specific requirements. Exhaustive coverage is neither practical nor needed, as more specific requirements are made in different sections, and can be tested there.
Nonetheless, this can be a good section to host tests for i18n requirements not covered in detail by the spec.
Possible additions:
-
tests for at least one language with line breaking based on orthographic syllable boundaries
-
Basic line breaking tests for some languages mentioned: Javanese, Balinese, Yi
6.1. 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 (tested with auto-phrase, but not with keep-all or manual)
-
More tests for “does not affect rules governing the soft wrap opportunities created around punctuation
6.1.1. Analytical Word Breaking
6.1.1.1. Lexical Word Breaking
Tests
This section has basic but adequate coverage
6.1.1.2. Orthographic Breaking
Tests
This section is untested.
6.1.1.3. Fallback Breaking
Tests
This section has basic but adequate coverage
6.1.2. Expressing User Preferences for Phrase-based Line Breaking
Tests
This section is untested, but it is not clear how it could be.
6.2. Line Breaking Strictness: the line-break property
Tests
This section has extensive test coverage for CJK.
Missing tests:
-
applies to text
-
affects intrinsic sizing
-
Line breaking classes CM and SG must be honored even with line-break: anywhere
Untestable(?):
-
behavior of “auto”
6.3. Hyphenation: Morphological Breaking Within Words
6.3.1. Hyphenation Control: the hyphens property
Tests
This section has partial test coverage.
Missing tests:
-
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.”
6.3.2. Hyphens: the hyphenate-character property
Tests
This section has partial coverage.
Missing tests:
-
applies to text
-
inheritance
-
the UA must insert the string according to the typographic conventions of the content language
Likely untestable:
-
when the UA truncates the string (which it may not do), it must not truncate part of a typographic character unit.
6.3.3. Hyphenation Size Limit: the hyphenate-limit-zone property
Tests
This section lacks tests.
6.3.4. Hyphenation Character Limits: the hyphenate-limit-chars property
Tests
This section has limited coverage.
Missing tests:
-
applies to text
-
inherited
-
If the third value is missing, it is the same as the second.
-
tests of the two-value syntax (but not just syntax tests, check that it has an effect)
-
tests of the 3 value syntax with auto in positions other than first (but not just syntax tests, check that it has an effect)
6.3.5. Hyphenation Line Limits: the hyphenate-limit-lines and hyphenate-limit-last properties
Tests
This section lacks tests.
6.4. Overflow Wrapping: the overflow-wrap/word-wrap property
Tests
This section has fairly good test coverage.
Missing tests:
-
Applies to text
-
in the case of auto-phrase, opportunities brought by anywhere only kick in after those from normal
-
No test of Animation type
7. Alignment and Justification
Tests
Tests only needed in subsections.
7.1. Text Alignment: the text-align shorthand
Tests
This section has partial test coverage.
Missing tests:
-
tests for the <
> value -
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
7.2. Character-based Alignment in a Table Column
Tests
This section lacks tests.
7.3. Default Text Alignment: the text-align-all property
Tests
This section lacks tests.
7.4. 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
7.5. 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 tests:
-
Applies to text
-
no-compress
-
ruby
Untestable(?):
-
behavior of auto
7.5.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
7.5.2. Handling Symbols and Punctuation
Tests
This section lacks tests. Not sure what is testable though.
7.5.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
7.5.4. Cursive Scripts
Tests
This section lacks automated tests.
7.5.5. Minimum Requirements for auto Justification
Tests
This section lacks tests.
7.6. Aligning a block of text within its container: the text-group-align property
Tests
This section has basic coverage.
Missing tests:
-
not inherited
-
animation type
-
the contents of descendants that establish independent formatting contexts are skipped.
-
works accross block containers within a single formatting context
-
interaction with floats
-
interaction with indents
8. Spacing
Tests
Tests only needed in subsections.
8.1. Word Spacing: the word-spacing property
Tests
This section has limited test coverage.
Missing tests:
-
Applies to text
-
inherit lengths as absolute
-
values may be negative
-
computed / resolved value of normal
-
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
8.2. Tracking: the letter-spacing property
Tests
This section has partial test coverage.
Missing tests:
-
Applies to text
-
percentage
-
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
8.2.1. Cursive Scripts
Tests
This section lacks tests. Not sure automated tests are possible.
8.3. Line Start/End Padding: the line-padding property
Tests
This section lacks tests.
8.4. Automatic Contextual Spacing: the text-autospace property
Tests
This section has spotty coverage.
8.4.1. Inter-script Spacing
Tests
This section does not need direct tests: the definition given here is exercised by ''text-autospace: ideograph-alpha'' and ''text-autospace: ideograph-numeric''.
8.5. CJK Punctuation Spacing: the text-spacing-trim property
Tests
This section has spotty test coverage.
The following aspects lack tests:
-
inheritance
-
animation type
-
applies to text
-
tests for trim-auto, allow-end, auto values
8.5.1. Fullwidth Punctuation Collapsing
Tests
This section has basic test coverage.
The following aspects lack tests:
-
The UA must not use the hwid feature or otherwise substitute halfwidth forms as switching to halfwidth glyphs can change the glyph shape which is not acceptable here.
-
changing font sizes
8.5.2. Text Spacing Character Classes
Tests
This section is mostly definitions, which are tested through their use in other sections, rather than needing tests of their own.
However, there are normative statements, so far untested, notably the classification of fullwidth colon punctuation and fullwidth dot punctuation under either the fullwidth closing punctuation category or the fullwidth middle dot punctuation category.
8.5.3. Japanese Paragraph-start Conventions in CSS
Tests
This section is an example, and doesn’t need tests.
8.6. Character Class Spacing Shorthand: the text-spacing property
Tests
This section lacks tests.
8.7. Shaping Across Element Boundaries
Tests
This section has good test coverage.
9. Edge Effects
Tests
Tests only needed in subsections.
9.1. First Line Indentation: the text-indent property
Tests
This section has adequate test coverage.
9.2. Hanging Glyphs
Tests
Test coverage TBD. Partly tested through § 9.2.1 Hanging Punctuation: the hanging-punctuation property partly through § 4.3.2 Phase II: Trimming and Positioning.
9.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
9.3. Bidirectionality and Line Boxes
Tests
This section 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.
Appendix H: Word and Phrase Detection
Tests
This section has partial test coverage.
Missing tests:
-
If a word or phrase is immediately followed by one or more of the following characters, the user agent must consider them to be part of the preceeding word or phrase
-
Punctuation is not a phrase by itself […]
Likely untestable:
-
The user agent must not place a word or phrase boundary between characters that compose a single typographic character unit
Security Considerations
Tests
Tests not needed for this section.
Privacy Considerations
Tests
Tests not needed for this section.
Acknowledgements
Tests
Tests not needed for this section.