4 ms·
A browser rendering engine's output isn't purely graphical, and most things can be tested through other means such as by reading console.log output, looking at
by missblit 3y ago
A browser rendering engine's output isn't purely graphical, and most things can be tested through other means such as by reading console.log output, looking at the DOM, or looking at computed CSS styles and/or bounding-box information.
In fact there's a good reason to keep graphical tests to a minimum: web specs do not dictate things down to the pixel level, so pixels can shift around from version to version, requiring the occasional golden data rebase.
Fun aside: Chrome's test suite contains a font named ahem.ttf where (almost) every character is an identical black rectangle. This allows tests to include text without relying too much on the details of a particular font.
- hnlmorg 3y agoThe examples you’ve given of the non-graphical elements are describing the easy problems and I was describing the hard problems. Our two posts aren’t mutually exclusive.