зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1323399 - Fix the stylo-vs-gecko reftest harness. r=heycam
MozReview-Commit-ID: 7htc3KOGGl6 --HG-- extra : rebase_source : 5be95cd80d3997e5e3146e98c50b4395679c8f00
This commit is contained in:
Родитель
c731ba1568
Коммит
9837011850
|
@ -55,6 +55,7 @@ const FOCUS_FILTER_ALL_TESTS = "all";
|
|||
const FOCUS_FILTER_NEEDS_FOCUS_TESTS = "needs-focus";
|
||||
const FOCUS_FILTER_NON_NEEDS_FOCUS_TESTS = "non-needs-focus";
|
||||
var gFocusFilterMode = FOCUS_FILTER_ALL_TESTS;
|
||||
var gCompareStyloToGecko = false;
|
||||
|
||||
// "<!--CLEAR-->"
|
||||
const BLANK_URL_FOR_CLEARING = "data:text/html;charset=UTF-8,%3C%21%2D%2DCLEAR%2D%2D%3E";
|
||||
|
@ -410,6 +411,12 @@ function InitAndStartRefTests()
|
|||
gFocusFilterMode = prefs.getCharPref("reftest.focusFilterMode");
|
||||
} catch(e) {}
|
||||
|
||||
#ifdef MOZ_STYLO
|
||||
try {
|
||||
gCompareStyloToGecko = prefs.getBoolPref("reftest.compareStyloToGecko");
|
||||
} catch(e) {}
|
||||
#endif
|
||||
|
||||
gWindowUtils = gContainingWindow.QueryInterface(CI.nsIInterfaceRequestor).getInterface(CI.nsIDOMWindowUtils);
|
||||
if (!gWindowUtils || !gWindowUtils.compareCanvases)
|
||||
throw "nsIDOMWindowUtils inteface missing";
|
||||
|
@ -1313,10 +1320,21 @@ function StartCurrentURI(aState)
|
|||
|
||||
RestoreChangedPreferences();
|
||||
|
||||
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
|
||||
getService(Components.interfaces.nsIPrefBranch);
|
||||
|
||||
if (gCompareStyloToGecko) {
|
||||
if (gState == 2){
|
||||
logger.info("Disabling Servo-backed style system");
|
||||
prefs.setBoolPref('layout.css.servo.enabled', false);
|
||||
} else {
|
||||
logger.info("Enabling Servo-backed style system");
|
||||
prefs.setBoolPref('layout.css.servo.enabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
var prefSettings = gURLs[0]["prefSettings" + aState];
|
||||
if (prefSettings.length > 0) {
|
||||
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
|
||||
getService(Components.interfaces.nsIPrefBranch);
|
||||
var badPref = undefined;
|
||||
try {
|
||||
prefSettings.forEach(function(ps) {
|
||||
|
|
|
@ -226,7 +226,8 @@ config = {
|
|||
"tests": ["tests/reftest/tests/layout/reftests/reftest.list"]},
|
||||
"reftest-stylo": {
|
||||
"options": ["--suite=reftest",
|
||||
"--disable-e10s"],
|
||||
"--disable-e10s",
|
||||
"--setpref=reftest.compareStyloToGecko=true"],
|
||||
"tests": ["tests/reftest/tests/layout/reftests/reftest-stylo.list"],
|
||||
},
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче