зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1328509 - Check failure patterns in assertSnapshots. r=xidorn
Several mochitests call `assertSnapshots`, which prints a reftest-like output for use with the reftest analyzer. Update these lines to check failure patterns before printing, like the regular assertion methods do. MozReview-Commit-ID: CfChoar7bp8
This commit is contained in:
Родитель
56b5ec82a0
Коммит
3d8b73c8cf
|
@ -62,10 +62,14 @@ function assertSnapshots(s1, s2, expectEqual, fuzz, s1name, s2name) {
|
|||
var sym = expectEqual ? "==" : "!=";
|
||||
ok(passed, "reftest comparison: " + sym + " " + s1name + " " + s2name);
|
||||
if (!passed) {
|
||||
let status = "TEST-UNEXPECTED-FAIL";
|
||||
if (usesFailurePatterns() && recordIfMatchesFailurePattern(s1name)) {
|
||||
status = "TEST-KNOWN-FAIL";
|
||||
}
|
||||
// The language / format in this message should match the failure messages
|
||||
// displayed by reftest.js's "RecordResult()" method so that log output
|
||||
// can be parsed by reftest-analyzer.xhtml
|
||||
var report = "REFTEST TEST-UNEXPECTED-FAIL | " + s1name +
|
||||
var report = "REFTEST " + status + " | " + s1name +
|
||||
" | image comparison (" + sym + "), max difference: " +
|
||||
maxDifference + ", number of differing pixels: " +
|
||||
numDifferentPixels + "\n";
|
||||
|
|
Загрузка…
Ссылка в новой задаче