зеркало из https://github.com/mozilla/pjs.git
bug 371059 - change "FAIL" to "KNOWN FAIL" for expected test failures in reftest (to avoid confusion)
r=dbaron
This commit is contained in:
Родитель
b43458eeca
Коммит
abbda1bb07
|
@ -216,35 +216,38 @@ function DocumentLoaded()
|
||||||
var key = IFrameToKey();
|
var key = IFrameToKey();
|
||||||
switch (gState) {
|
switch (gState) {
|
||||||
case 1:
|
case 1:
|
||||||
|
// First document has been loaded. Save its key and
|
||||||
|
// proceed to load the second document.
|
||||||
gPart1Key = key;
|
gPart1Key = key;
|
||||||
|
|
||||||
StartCurrentURI(2);
|
StartCurrentURI(2);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
// Both documents have been loaded. Compare the renderings and see
|
||||||
|
// if the comparison result matches the expected result specified
|
||||||
|
// in the manifest.
|
||||||
|
|
||||||
|
// whether the two renderings match:
|
||||||
var equal = (key == gPart1Key);
|
var equal = (key == gPart1Key);
|
||||||
var result = "REFTEST ";
|
// whether the comparison result matches what is in the manifest
|
||||||
var test_passed = (equal == gURLs[0].equal);
|
var test_passed = (equal == gURLs[0].equal);
|
||||||
|
// what is expected on this platform (PASS, FAIL, or RANDOM)
|
||||||
var expected = gURLs[0].expected;
|
var expected = gURLs[0].expected;
|
||||||
switch (expected) {
|
|
||||||
case EXPECTED_PASS:
|
var outputs = {};
|
||||||
if (!test_passed) result += "UNEXPECTED ";
|
const randomMsg = " (RESULT EXPECTED TO BE RANDOM)";
|
||||||
break;
|
outputs[EXPECTED_PASS] = {true: "PASS",
|
||||||
case EXPECTED_FAIL:
|
false: "UNEXPECTED FAIL"};
|
||||||
if (test_passed) result += "UNEXPECTED ";
|
outputs[EXPECTED_FAIL] = {true: "UNEXPECTED PASS",
|
||||||
break;
|
false: "KNOWN FAIL"};
|
||||||
case EXPECTED_RANDOM:
|
outputs[EXPECTED_RANDOM] = {true: "PASS" + randomMsg,
|
||||||
result += "(RESULT EXPECTED TO BE RANDOM) "
|
false: "KNOWN FAIL" + randomMsg};
|
||||||
break;
|
|
||||||
}
|
var result = "REFTEST " + outputs[expected][test_passed] + ": ";
|
||||||
if (test_passed) {
|
|
||||||
result += "PASS: ";
|
|
||||||
} else {
|
|
||||||
result += "FAIL: ";
|
|
||||||
}
|
|
||||||
if (!gURLs[0].equal) {
|
if (!gURLs[0].equal) {
|
||||||
result += "(!=) ";
|
result += "(!=) ";
|
||||||
}
|
}
|
||||||
result += gURLs[0].url1.spec;
|
result += gURLs[0].url1.spec; // the URL being tested
|
||||||
dump(result + "\n");
|
dump(result + "\n");
|
||||||
if (!test_passed && expected == EXPECTED_PASS) {
|
if (!test_passed && expected == EXPECTED_PASS) {
|
||||||
dump("REFTEST IMAGE 1 (TEST): " + gPart1Key + "\n");
|
dump("REFTEST IMAGE 1 (TEST): " + gPart1Key + "\n");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче