Skip to content

Commit

Permalink
Merge pull request #1574 from zcorpan/docs-reftest-require-link
Browse files Browse the repository at this point in the history
[docs] Reftests require a link to the reference
  • Loading branch information
jgraham committed Jan 22, 2015
2 parents 446f6b3 + 2b24c60 commit cabab84
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions docs/reftests.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,11 @@ test.

In a reftest the test is required to either match or mismatch the
rendering of the reference file. In order to specify this
relationship there are two possible options:
relationship, use a `link` element with `rel="match"` or `rel="mismatch"` and
`href` attribute pointing to the reference file e.g. `<link
rel=match href=references/green-box.html>`.

* Give the test file and the reference file the same name but with the
reference file having the suffix `-ref` before the file extension
e.g. `test.html` and `test-ref.html`. This only works where the test
and the ref must match.

* Use a `link` element with `rel="match"` or `rel="mismatch"` and
`href` attribute pointing to the reference file e.g. `<link
rel=match href=references/green-box.html>`.

In general the second form is more expressive and so preferred. In
particular it is more conducive to sharing the same reference amongst
multiple files.
If possible, share the same reference file amongst multiple tests.

## Controlling When Comparison Occurs

Expand Down

0 comments on commit cabab84

Please sign in to comment.