Bug 1736859 - [mochitest] Dump some prefs that are set in TestRunner.js, r=gbrown

This will help us validate that are active in the test run are *actually* the
ones that the Python side of the harness is reporting.

Differential Revision: https://phabricator.services.mozilla.com/D129308
This commit is contained in:
Andrew Halberstadt 2021-10-27 13:33:47 +00:00
Родитель 275ee059b8
Коммит 60d2481e28
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -467,6 +467,22 @@ TestRunner.getParameterInfo = function() {
return this._params;
};
/**
* Print information about which prefs are set.
* This is used to help validate that the tests are actually
* running in the expected context.
*/
TestRunner.dumpPrefContext = function() {
let prefs = ["fission.autostart"];
let message = ["Dumping test context:"];
prefs.forEach(function formatPref(pref) {
let val = SpecialPowers.getBoolPref(pref);
message.push(pref + "=" + val);
});
TestRunner.structuredLogger.info(message.join("\n "));
};
/**
* TestRunner entry point.
*
@ -475,6 +491,7 @@ TestRunner.getParameterInfo = function() {
**/
TestRunner.runTests = function(/*url...*/) {
TestRunner.structuredLogger.info("SimpleTest START");
TestRunner.dumpPrefContext();
TestRunner.originalTestURL = $("current-test").innerHTML;
SpecialPowers.registerProcessCrashObservers();