Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests should be hardened in respect of varying viewport sizes and pagination #20835

Open
karstenw-ro opened this issue Dec 18, 2019 · 1 comment

Comments

@karstenw-ro
Copy link
Contributor

In general, whether a test passes should only depend on whether the used agent implements the tested feature correctly or not.
However, in some cases, for example if the viewport is not wide enough, tests may fail erroneously.

This behavior can be reproduced with the following steps:

  1. Load the grid-content-distribution-must-account-for-track-sizing-004.html test using a browser that passes it.
  2. Resize the window until the viewport is less than 230px wide (As the minimum width of the window might be limited, it might be required to dock the development tools to its side).
  3. Reload the test.
  4. The test result should change from passed to fail.

In this case, the containing block of the inline-grid element becomes too small. This changes the resulting layout, including the widths checked by the test.
To resolve this, a width or min-width could be applied to one the ancestors of such elements by default.

Another aspect which shows a similar behavior is pagination.
When a page break occurs inside an element, it is split into two, making it impossible to achieve the intended result.
To overcome this, the break-inside property could be set to avoid for such elements or their ancestors.
As this style only applies to paged media, this should not influence any tests run in a non paged medium.

@gsnedders
Copy link
Member

see also: web-platform-tests/rfcs#188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants