зеркало из https://github.com/mozilla/gecko-dev.git
Bug 729784 - Fix documentation for fuzzy() and fuzzy-if(), and give image difference error messages in the same order as the parameters to them. r=dbaron
This commit is contained in:
Родитель
feddad01ec
Коммит
f35d4ac58f
|
@ -106,13 +106,16 @@ must be one of the following:
|
|||
fast on a 32-bit system but inordinately slow on a
|
||||
64-bit system).
|
||||
|
||||
fuzzy This allows a test to pass if the pixel value differences
|
||||
are <= 2. It can also be used with '!=' to ensure that the
|
||||
difference is greater than 2.
|
||||
fuzzy(maxDiff, diffCount)
|
||||
This allows a test to pass if the pixel value differences are <=
|
||||
maxDiff and the total number of different pixels is <= diffCount.
|
||||
It can also be used with '!=' to ensure that the difference is
|
||||
greater than maxDiff.
|
||||
|
||||
fuzzy-if(condition) If the condition is met, the test is treated as if
|
||||
'fuzzy' had been specified. This is useful if there
|
||||
are differences on particular platforms.
|
||||
fuzzy-if(condition, maxDiff, diffCount)
|
||||
If the condition is met, the test is treated as if 'fuzzy' had been
|
||||
specified. This is useful if there are differences on particular
|
||||
platforms.
|
||||
|
||||
require-or(cond1&&cond2&&...,fallback)
|
||||
Require some particular setup be performed or environmental
|
||||
|
|
|
@ -1456,7 +1456,7 @@ function RecordResult(testRunTime, errorMsg, scriptResults)
|
|||
if (!equal) {
|
||||
gDumpLog("REFTEST IMAGE 1 (TEST): " + gCanvas1.toDataURL() + "\n");
|
||||
gDumpLog("REFTEST IMAGE 2 (REFERENCE): " + gCanvas2.toDataURL() + "\n");
|
||||
gDumpLog("REFTEST number of differing pixels: " + differences + " max difference: " + maxDifference.value + "\n");
|
||||
gDumpLog("REFTEST max difference: " + maxDifference.value + " number of differing pixels: " + differences + "\n");
|
||||
} else {
|
||||
gDumpLog("REFTEST IMAGE: " + gCanvas1.toDataURL() + "\n");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче