зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1382427 - Support running reftest in a mode that runs the test with Retained Display lists on, and references with it off. r=mattwoodrow
This change adds a pref reftest.compareRetainedDisplayLists to enable this mode. MozReview-Commit-ID: JxSkJrQifQx
This commit is contained in:
Родитель
fe054d4e08
Коммит
08a7a8b80b
|
@ -69,6 +69,7 @@ for (let [key, val] of Object.entries({
|
|||
urlFilterRegex: {},
|
||||
contentGfxInfo: null,
|
||||
focusFilterMode: "all",
|
||||
compareRetainedDisplayLists: false,
|
||||
compareStyloToGecko: false,
|
||||
|
||||
browser: undefined,
|
||||
|
|
|
@ -68,6 +68,10 @@ function ReadManifest(aURL, inherited_status, aFilter)
|
|||
var lineNo = 0;
|
||||
var urlprefix = "";
|
||||
var defaultTestPrefSettings = [], defaultRefPrefSettings = [];
|
||||
if (g.compareRetainedDisplayLists) {
|
||||
AddRetainedDisplayListTestPrefs(sandbox, defaultTestPrefSettings,
|
||||
defaultRefPrefSettings);
|
||||
}
|
||||
if (g.compareStyloToGecko) {
|
||||
AddStyloTestPrefs(sandbox, defaultTestPrefSettings,
|
||||
defaultRefPrefSettings);
|
||||
|
@ -106,6 +110,10 @@ function ReadManifest(aURL, inherited_status, aFilter)
|
|||
throw "Error in pref value in manifest file " + aURL.spec + " line " + lineNo;
|
||||
}
|
||||
}
|
||||
if (g.compareRetainedDisplayLists) {
|
||||
AddRetainedDisplayListTestPrefs(sandbox, defaultTestPrefSettings,
|
||||
defaultRefPrefSettings);
|
||||
}
|
||||
if (g.compareStyloToGecko) {
|
||||
AddStyloTestPrefs(sandbox, defaultTestPrefSettings,
|
||||
defaultRefPrefSettings);
|
||||
|
@ -351,7 +359,7 @@ function ReadManifest(aURL, inherited_status, aFilter)
|
|||
secMan.checkLoadURIWithPrincipal(principal, refURI,
|
||||
CI.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
||||
var type = items[0];
|
||||
if (g.compareStyloToGecko) {
|
||||
if (g.compareStyloToGecko || g.compareRetainedDisplayLists) {
|
||||
type = TYPE_REFTEST_EQUAL;
|
||||
refURI = testURI;
|
||||
|
||||
|
@ -510,6 +518,10 @@ function BuildConditionSandbox(aURL) {
|
|||
sandbox.webrtc = false;
|
||||
#endif
|
||||
|
||||
let retainedDisplayListsEnabled = prefs.getBoolPref("layout.display-list.retain", false);
|
||||
sandbox.retainedDisplayLists = retainedDisplayListsEnabled && !g.compareRetainedDisplayLists;
|
||||
sandbox.compareRetainedDisplayLists = g.compareRetainedDisplayLists;
|
||||
|
||||
#ifdef MOZ_STYLO
|
||||
let styloEnabled = false;
|
||||
// Perhaps a bit redundant in places, but this is easier to compare with the
|
||||
|
@ -597,6 +609,14 @@ function BuildConditionSandbox(aURL) {
|
|||
return sandbox;
|
||||
}
|
||||
|
||||
function AddRetainedDisplayListTestPrefs(aSandbox, aTestPrefSettings,
|
||||
aRefPrefSettings) {
|
||||
AddPrefSettings("test-", "layout.display-list.retain", "true", aSandbox,
|
||||
aTestPrefSettings, aRefPrefSettings);
|
||||
AddPrefSettings("ref-", "layout.display-list.retain", "false", aSandbox,
|
||||
aTestPrefSettings, aRefPrefSettings);
|
||||
}
|
||||
|
||||
function AddStyloTestPrefs(aSandbox, aTestPrefSettings, aRefPrefSettings) {
|
||||
AddPrefSettings("test-", "layout.css.servo.enabled", "true", aSandbox,
|
||||
aTestPrefSettings, aRefPrefSettings);
|
||||
|
@ -621,7 +641,8 @@ function AddPrefSettings(aWhere, aPrefName, aPrefValExpression, aSandbox, aTestP
|
|||
type: prefType,
|
||||
value: prefVal };
|
||||
|
||||
if (g.compareStyloToGecko && aPrefName != "layout.css.servo.enabled") {
|
||||
if ((g.compareStyloToGecko && aPrefName != "layout.css.servo.enabled") ||
|
||||
(g.compareRetainedDisplayLists && aPrefName != "layout.display-list.retain")) {
|
||||
// ref-pref() is ignored, test-pref() and pref() are added to both
|
||||
if (aWhere != "ref-") {
|
||||
aTestPrefSettings.push(setting);
|
||||
|
|
|
@ -273,6 +273,9 @@ function InitAndStartRefTests()
|
|||
g.startAfter = undefined;
|
||||
}
|
||||
|
||||
try {
|
||||
g.compareRetainedDisplayLists = prefs.getBoolPref("reftest.compareRetainedDisplayLists");
|
||||
} catch (e) {}
|
||||
#ifdef MOZ_STYLO
|
||||
try {
|
||||
g.compareStyloToGecko = prefs.getBoolPref("reftest.compareStyloToGecko");
|
||||
|
|
Загрузка…
Ссылка в новой задаче