CSS Text 3 test coverage report

2019-09-27

Prepared by:
Florian Rivoal (Invited Expert)

Abstract

This report evaluates the test coverage of the CSS Text Module Level 3 as it was on 2019-09-27 when the latest commit was 3c52c266d27e0bdcc583f8d232fdd359efc1ba81. It is provided for discussion only and may change at any moment. Its publication here does not imply endorsement of its contents by W3C, or the CSS-Working Group. Don’t cite this document other than as work in progress.

It takes into account tests in:

It does not include tests from:

The following sections mirror the outline of the specification itself, and each section links to the corresponding one in he specification.

Issue:

Problems other than missing spec coverage are highlighted he same as as this paragraph is.


1 Introduction

Tests not needed.

1.1 Module Interactions

Tests not needed.

1.2 Values

Tests not really needed.

Possible addition:

1.3 Languages and Typesetting

Tests not really needed: these are definitions, they get tested through their applications, not standalone.

Possible addition:

1.4 Characters and Letters

For the most part, tests not really needed: these are definitions, they get tested through their applications, not standalone. The few testable assertions that are made have coverage.

Possible addition:

1.5 Text Processing

Adequate coverage.

Exhaustive coverage unrealistic, since this section is effectively a dependency on all of Unicode. Some tests nonetheless provided for sanity checking (such as the effect of certain control characters on Arabic shaping).

2 Transforming Text

Test only needed in subsection.

2.1 Case Transforms: the text-transform property

Overall good coverage. Very good i18n coverage.

Missing:

Possible addition:

3 White Space and Wrapping: the white-space property

Good overal coverage through section 4 (white space processing details) and subsections.

Missing tests:

Possible addition:

4 White Space Processing Details

Partial coverage.

Missing tests:

4.1 The White Space Processing Rules

Sufficient coverage. All parts of this section are well exercised.

Most tests to be found in subsections.

4.1.1 Phase I: Collapsing and Transformation

Sufficient coverage. All parts of this section are well exercised.

4.1.2 Segment Break Transformation Rules

Partial coverage.

Indirectly tested, no dedicated tests:

Missing tests:

4.1.3 Phase II: Trimming and Positioning

Almost sufficient coverage. Most parts of this section are well exercised.

Missing tests:

4.2 Tab Character Size: the tab-size property

Partial coverage.

Missing tests

5 Line Breaking and Word Boundaries

Tests not really needed: these are definitions, they get tested through their applications, not standalone.

Can be a good section to host tests for i18n requirements not covered in detail by the spec.

Possible Additions:

5.1 Line Breaking Details

Partial Coverage.

Missing tests:

Untestable(?):

5.2 Breaking Rules for Letters: the word-break property

Partial Coverage.

Missing tests:

Covered, but could have more:

5.3 Line Breaking Strictness: the line-break property

Extensive CJK coverage.

Missing tests:

Untestable(?):

5.4 Hyphenation: the hyphens property

Spotty coverage.

Covered, but insufficiently:

Missing tests:

5.5 Overflow Wrapping: the overflow-wrap/word-wrap property

Partial coverage.

Missing tests:

5.6 Shaping Across Intra-word Breaks

Good Coverage.

6 Alignment and Justification

Test only needed in subsection.

6.1 Text Alignment: the text-align shorthand

Partial Coverage.

Missing tests:

6.2 Default Text Alignment: the text-align-all property

No Tests.

6.3 Last Line Alignment: the text-align-last property

Almost no automated tests.

6.4 Justification Method: the text-justify property

Light coverage.

Note: all values (other than auto) are tested, but the tests are minimal. Not sure we can do better though.

Missing tests:

Untestable(?):

6.4.1 Expanding and Compressing Text

No tests.

Missing tests:

6.4.2 Handling Symbols and Punctuation

No tests.

Not sure what is testable though

6.4.3 Unexpandable Text

Basic coverage.

Missing tests:

6.4.4 Cursive Scripts

No automated tests.

6.4.5 Minimum Requirements for auto Justification

No Tests

7. Spacing

Test only needed in subsections.

7.1 Word Spacing: the word-spacing property

Almost No tests.

Missing tests:

Problematic test

7.2 Tracking: the letter-spacing property

Spotty Coverage.

Missing tests:

7.2.1 Cursive Scripts

No Tests.

Not sure this can be tested automatically.

7.3 Shaping Across Element Boundaries

Good Coverage.

8 Edge Effects

Test only needed in subsection.

8.1 First Line Indentation: the text-indent property

Partial Coverage.

Missing tests:

8.2 Hanging Glyphs

Coverage TBD. Partly tested through 8.2, partly through white-space.

8.2.1 Hanging Punctuation: the hanging-punctuation property

Spotty Coverage.

All values tested.

Missing tests:

8.3 Bidirectionality and Line Boxes

No tests.

Missing tests:

Appendix A: Text Processing Order of Operations

No Tests. Probably not needed anyway.

Appendix B: Conversion to Plaintext

No Tests.

Missing tests:

Appendix C: Default UA Stylesheet

Tests not needed.

Appendix D: Scripts and Spacing

Tests not needed?

Appendix E: Characters and Properties

No Tests.

Missing tests:

Appendix F. Tagging Content by Writing System

Partial Coverage.

Each of the diverse 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

Adequate Coverage.

Tested via the text-transform property.