Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1846)

Unified Diff: docs/testing/writing_layout_tests.md

Issue 2547463003: Tweak the descriptions of the various types of layout tests. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/testing/writing_layout_tests.md
diff --git a/docs/testing/writing_layout_tests.md b/docs/testing/writing_layout_tests.md
index 6656762d1b294d89bf5643675bc1df43ccdf9a87..dae850c7c328c9ae2351cf586b885bfb14627e53 100644
--- a/docs/testing/writing_layout_tests.md
+++ b/docs/testing/writing_layout_tests.md
@@ -49,22 +49,28 @@ There are four broad types of layout tests, listed in the order of preference.
JavaScript tests, and are only used when JavaScript tests are insufficient,
such as when testing paint code.
* *Pixel Tests* render a test page and compare the result against a pre-rendered
- baseline image in the repository. Pixel tests are less robust than all
- alternatives listed above, because the rendering of a page is influenced by
+ baseline image in the repository. Pixel tests are less robust than the
+ first two types, because the rendering of a page is influenced by
pwnall 2016/12/02 02:35:10 Thanks for catching this inconsistency!
many factors such as the host computer's graphics card and driver, the
platform's text rendering system, and various user-configurable operating
system settings. For this reason, it is common for a pixel test to have a
- different reference image for each platform that Blink is tested on. Pixel
- tests are least preferred, because the reference images are
- [quite cumbersome to manage](./layout_test_expectations.md).
-* *Dump Render Tree (DRT) Tests* output a textual representation of the render
+ different reference image for each platform that Blink is tested on, and
+ the reference images are
+ [quite cumbersome to manage](./layout_test_expectations.md). You
+ should only write a pixel test if you cannot use a reference test. By default
+ a pixel test will also dump the render tree as text output, so they are
+ similar to ...
+* *Render tree tests*, which output a textual representation of the render
tree, which is the key data structure in Blink's page rendering system. The
- test passes if the output matches a baseline text file in the repository. In
- addition to their text result, DRT tests can also produce an image result
- which is compared to an image baseline, similarly to pixel tests (described
- above). A DRT test with two results (text and image) passes if _both_ results
- match the baselines in the repository. DRT tests are less desirable than all
- the alternatives, because they depend on a browser implementation detail.
+ test passes if the output matches a baseline text file in the repository.
+ Render tree tests are used as a last resort to test the internal quirks of
+ the implementation, and they should be avoided in favor of one of the earlier
+ options. Most render tree tests also produce image results, and so these
pwnall 2016/12/02 02:35:10 I think that the text starting at "Most render tre
Dirk Pranke 2016/12/02 02:44:54 Okay.
+ tests are easily confused with Pixel tests. The distinction lies in whether
+ you care about the visual image, the details of how that image was
+ constructed, or both. It is possible for multiple render trees to produce
+ the same pixel output, so it is important to make it clear in the test
+ which outputs you really care about.
## General Principles
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698