This document is intended to be used as a guideline for the testing activities related to the CSS Grid Layout Level 1 spec [[!css3-grid-layout]]. 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 Grid Layout 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 Grid Layout 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 Grid Layout 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 Grid Layout 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, linking 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 Grid Layout
specification, 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 ongoing efforts to make WebDriver
[[webdriver]] automated tests a first class citizen 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
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.
These are testing areas normatively defined by the spec. They cover things explicitly or implicitly defined in the CSS Grid Layout 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 Grid Layout spec or ask a question on the mailing list adding [css-grid] to the subject.
column-*properties have no effect on a grid container [#628].
clearhave no effect on a grid item [#629].
floataffects to the computed value of display on grid items [#630].
vertical-alignhas no effect on a grid item [#631].
first-letterdo not apply to grid containers [#632].
The spec examples should become tests (maybe some of them need to be defined as manual tests). This will allow to increase the coverage with more tests, but also to check the spec itself.
These are testing areas either normatively defined in other specs that explicitly refer to the CSS Grid Layout spec or simply not explicitly defined, but implied by various aspects of the 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 Grid Layout spec or ask a question on the mailing list adding [css-grid] to the subject.
Below is the list of implicit testing areas:
designModeand input elements [[!html5]].
Below is a list of people you should reach out to if you have any questions related to this document or testing CSS Grid Layout in general:
Currently test progress tracking is done via GitHub milestones and issues.