blob: e143d0b2ca48019e6132f02c715e9df430d2d429 [file] [log] [blame] [view]
Kent Tamura59ffb022018-11-27 05:30:561# Web Test Expectations and Baselines
pwnalld8a250722016-11-09 18:24:032
Kent Tamura59ffb022018-11-27 05:30:563The primary function of the web tests is as a regression test suite; this
pwnalld8a250722016-11-09 18:24:034means that, while we care about whether a page is being rendered correctly, we
5care more about whether the page is being rendered the way we expect it to. In
6other words, we look more for changes in behavior than we do for correctness.
7
8[TOC]
9
Kent Tamura59ffb022018-11-27 05:30:5610All web tests have "expected results", or "baselines", which may be one of
pwnalld8a250722016-11-09 18:24:0311several forms. The test may produce one or more of:
12
13* A text file containing JavaScript log messages.
14* A text rendering of the Render Tree.
15* A screen capture of the rendered page as a PNG file.
16* WAV files of the audio output, for WebAudio tests.
17
Kent Tamura59ffb022018-11-27 05:30:5618For any of these types of tests, baselines are checked into the web_tests
Robert Ma06f7acc2017-11-14 17:55:4719directory. The filename of a baseline is the same as that of the corresponding
20test, but the extension is replaced with `-expected.{txt,png,wav}` (depending on
21the type of test output). Baselines usually live alongside tests, with the
22exception when baselines vary by platforms; read
Kent Tamura59ffb022018-11-27 05:30:5623[Web Test Baseline Fallback](web_test_baseline_fallback.md) for more
Robert Ma06f7acc2017-11-14 17:55:4724details.
25
26Lastly, we also support the concept of "reference tests", which check that two