Bug 1344132 - Make reftest run stylo-vs-gecko test without special reftest.list. r=dbaron
MozReview-Commit-ID: 3XqZGNoqG2h
--- a/layout/tools/reftest/reftest.jsm
+++ b/layout/tools/reftest/reftest.jsm
@@ -760,21 +760,29 @@ function AddPrefSettings(aWhere, aPrefNa
} else if (valType == "number" && (parseInt(prefVal) == prefVal)) {
prefType = PREF_INTEGER;
} else {
return false;
}
var setting = { name: aPrefName,
type: prefType,
value: prefVal };
- if (aWhere != "ref-") {
- aTestPrefSettings.push(setting);
- }
- if (aWhere != "test-") {
- aRefPrefSettings.push(setting);
+ if (gCompareStyloToGecko && aPrefName != "layout.css.servo.enabled") {
+ // ref-pref() is ignored, test-pref() and pref() are added to both
+ if (aWhere != "ref-") {
+ aTestPrefSettings.push(setting);
+ aRefPrefSettings.push(setting);
+ }
+ } else {
+ if (aWhere != "ref-") {
+ aTestPrefSettings.push(setting);
+ }
+ if (aWhere != "test-") {
+ aRefPrefSettings.push(setting);
+ }
}
return true;
}
function ReadTopManifest(aFileURL, aFilter)
{
var url = gIOService.newURI(aFileURL);
if (!url)
@@ -1117,18 +1125,22 @@ function ReadManifest(aURL, inherited_st
gIOService.newURI(items[2], null, listURL)];
var prettyPath = runHttp
? gIOService.newURI(items[1], null, listURL).spec
: testURI.spec;
secMan.checkLoadURIWithPrincipal(principal, testURI,
CI.nsIScriptSecurityManager.DISALLOW_SCRIPT);
secMan.checkLoadURIWithPrincipal(principal, refURI,
CI.nsIScriptSecurityManager.DISALLOW_SCRIPT);
-
- AddTestItem({ type: items[0],
+ var type = items[0];
+ if (gCompareStyloToGecko) {
+ type = TYPE_REFTEST_EQUAL;
+ refURI = testURI;
+ }
+ AddTestItem({ type: type,
expected: expected_status,
allowSilentFail: allow_silent_fail,
prettyPath: prettyPath,
minAsserts: minAsserts,
maxAsserts: maxAsserts,
needsFocus: needs_focus,
slow: slow,
prefSettings1: testPrefSettings,