CSS Text 3 test coverage report

2023-10-20

Prepared by:
Florian Rivoal (Invited Expert)

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:


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:

Possible additions:


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:


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:


4. White Space Processing & Control Characters

Tests

This section has reasonably good test coverage.

Missing tests:


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:


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:


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:


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:


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:


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:

Untestable(?):


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:


6.1. Breaking Rules for Letters: the word-break property

Tests

This section has partial test coverage.

Missing tests:


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:

Untestable(?):


6.3. Hyphenation: Morphological Breaking Within Words

6.3.1. Hyphenation Control: the hyphens property

Tests

This section has partial test coverage.

Missing tests:


6.3.2. Hyphens: the hyphenate-character property

Tests

This section has partial coverage.

Missing tests:

Likely untestable:


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:


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:


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:


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:


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:

Untestable(?):


7.5.1. Expanding and Compressing Text

Tests

This section lacks tests.

Missing tests:


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:


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:


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:


8.2. Tracking: the letter-spacing property

Tests

This section has partial test coverage.

Missing tests:


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:


8.5.1. Fullwidth Punctuation Collapsing

Tests

This section has basic test coverage.

The following aspects lack tests:


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:


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:


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:

Likely untestable:


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.


Changes

Additions Since Level 3