This document is intended to be used as a guideline for the testing activities related to the CSS Writing Modes spec [[!css3-writing-modes]]. Its main goal is to provide an overview of the general testing areas, possible caveats and testing aspects not immediately apparent from the spec. Also, it provides a means of tracking the progress of the CSS Writing Modes spec testing.
This document is not meant to replace the spec in determining the normative and non-normative assertions to be tested, but rather complement it.
As CSS moved away from the monolithic development of CSS 2.1 to the modular development of CSS 3, the number of proposed new features and the complexity of the layout landscape have increased dramatically. While this directly translates to increased flexibility and agility in adopting and implementing new CSS features, it also increases the complexity of testing CSS features and the need for coordinating the testing efforts. Also, the need for testing coordination increases as crowd-sourcing efforts like Test the Web Forward present people less familiar with the processes and policies of the W3C with the opportunity to contribute new tests.
Except when defining new behaviors or redefining old behaviors, the implicit assumption for new CSS modules is that they play nicely with other modules or properties defined in CSS 2.1 [[CSS21]]. As CSS Writing Modes is a spec that touches many aspects of layout, styling and CSSOM, it's not unreasonable to want to test the spec against these implicit assumptions, too.
This testing strategy document is meant to complement the CSS Writing Modes spec and the existing test suite by providing an overview of the testing areas (especially the less apparent ones) and tracking the progress of the testing activities against these test areas.
To ensure a comprehensive test suite with useful, high quality tests, a number of goals are proposed. They range from process goals (how to conduct testing) to implementation goals (how to write good tests).
An important vector in successfully testing CSS Writing Modes is to enable easy test contributions, both from W3C partners and from non-W3C members that wish to contribute. This is achieved by clearly marking and explaining the areas that need testing, linked to existing tests and general testing progress.
In order to increase the quality of the test contributions, this document offers a set of guidelines for conducting testing (see ) and a testing progress tracker to increase the surface coverage of tests (see ).
In terms of actual tests produced for the CSS Writing Modes, the main goal
is to ensure that most tests are automatable (i.e. they're either
reftests or use testharness.js
). Even where manual tests
are absolutely necessary they should be written so that they can be
easily automated – as there are on-going efforts to make
WebDriver [[webdriver]] automated tests a first class citized in W3C
testing. This means that even if a manual test requires user
interaction, the validation or PASS/FAIL conditions should still be
clear enough as to allow automatic validation if said interaction is
later automated.
In particular need a special font in the test of CSS Writing Modes. Since these are is assumed of many tests, people who try to create the test now, check to see whether any available font.
There are a number of risks associated with creating a high-quality test suite for CSS Writing Modes. The most important ones are listed below.
The CSS Writing Modes spec introduces a significant change in the way layout
can be done and as a consequence, many of the assumptions that hold in
the context of CSS 2.1 must be re-validated in the context of CSS
Writing Modes. In the meanwhile, a lot of new layout modules have been
proposed, with various degrees of implementer support and maturity.
Also, non-CSS specific specs introduced concepts that affect how style
is propagated (e.g. Shadow DOM [[shadow-dom]]) or how elements are
rendered and interact with their containing documents (e.g.
<iframe seamless>
in HTML 5 [[HTML5]]).
All the above factors increase the testing surface and the number of the possible cases that might need an explicitly specified behavior in order to ensure intuitive and predictable results as well as stable interaction with widely used browser features (that might not be yet so strictly specified).
In terms of specifying the expected behavior, the current approach is to try and specify it for specs that are final or nearly-final and to just make a note of the possible interactions and unspecified behaviors in the case of specs that are still in flux. In exceptional cases, a new spec might be created to cater for the needs of multiple specs (e.g. the CSS Fragmentation spec [[css3-break]]).
Given the complexity of the spec, a big number of tests will need to be created to produce a test suite that can ensure interoperability between implementations.
In this context, the main purpose of this document is to provide useful informations for creating and contributing tests in an effective manner in terms of coverage and test quality.
For building reftest, several special fonts are necessary. If could not get some fonts, a test will be manual or reftest waiting fonts.
As spec testing cannot be realistically separated from testing a particular implementation (except for the very simple cases), the approach proposed for testing is one that tries to first cover as many areas as possible, instead of deep diving on a certain feature or aspect of the spec first. A side benefit of this approach is that the spec tests can be used at any time to gauge the level of support of a certain implementation.
Having this breadth-first approach in mind, tests will be created for the testing areas listed in . Testing will be done in multiple passes, each aimed at covering more specific edge-cases.
The selection of test data, in terms of parsing, rendering, choose only one typical values from the data set on the same effect (It is a test technique known "equivalence partitioning").
These are testing areas normatively defined by the spec. They cover things explicitly or implicitly defined in the CSS Writing Modes spec. Please note that while detailed, this list is not necessarily exhaustive and normative behaviors may not be contained in it. When in doubt, consult the CSS Writing Modes spec or ask a question on the mailing list.
direction
unicode-bidi
writing-mode
text-orientation
caption-side
text-combine-upright
display:none
button
input:text
select
text-area
writing-mode
, text-orientation
. The original definition about 'Box model' see [[CSS21]] for details. Calculation of the following in particular:
margin
border
padding
Parse, Rendering fundamental when combined the direction
property and the unicode-bidi
property. Applying Unicode bidirectional algorithm, behavior when the value is a newline. Placement of split inline-box. Calculation positioning of the box element.
Parse, Rendering fundamental for the writing-mode
property. Character should be considered in particular the placement in vertical writing mode(Punctuation, etc. Onbiki in Japanese). Rendering for principal writing mode. Handling of child block in the case of line feed direction different from the container block. Converte value of the SVG in the writing-mode.
Consider baseline alphabetic, central in this specification. Baseline in vertical alignment for glyph, processing of dominant baseline.
Parse, Rendering fundamental for the text-orientation
property. rendering when the vertical writing mode. Rules of Appendix C.
Processing over and under in line-relative directions. left, right adding in vertical writing mode to line-box. The processing of before, after, start, end of each block-level-element, inline-level-element in flow-relative directions.
Layout rule that refers to property in the box when in vertical writing mode and margin collapsing. Sizing, auto-sizing of the writing modes in Orthogonal Flow. Margin calculation in the case of Flow-Relative. Position calculation in the case of Line-Relative. Properties that do not affect the WritingMode. rendering and parsing of caption-side
property.
It is a page feed flow specification of UA, is beyond the scope of the current test environment.
Parse, Rendering fundamental for the text-combine-upright
property. rendering when the vertical writing mode. Interrupted by a box boundary in text run-rules. Glyph of centering in 1em box. Several algorithms to compress the 1em glyph of multiple.
These are testing areas either normatively defined in other specs that explicitly refer to the CSS Writing Modes spec (e.g. [[css3-text]]) or simply not explicitly defined, but implied by various aspects of the spec (e.g. processing model, CSS 2.1 compliance, etc.). Please note that while detailed, this list is not necessarily exhaustive and normative behaviors may not be contained in it. When in doubt, consult the CSS Writing Modes spec or ask a question on the mailing list.
Below is the list of implicit testing areas:
overflow
clip
line-height
alt
attribute Below is a list of people you should reach out to if you have any questions related to this document or testing CSS Writing Modes in general:
Currently test progress tracking is done via gitHub milestones and issues.