Bug 1725702 - pretty print dictionary of variables available for reftest annotations. r=gbrown

Depends on D123499

Differential Revision: https://phabricator.services.mozilla.com/D123500
This commit is contained in:
Sebastian Hengst 2021-08-24 22:15:04 +00:00
parent b33e353ec2
commit 8136109b66

View File

@ -640,8 +640,11 @@ function BuildConditionSandbox(aURL) {
sandbox.serviceWorkerE10s = true;
if (!g.dumpedConditionSandbox) {
g.logger.info("Dumping JSON representation of sandbox");
g.logger.info(JSON.stringify(Cu.waiveXrays(sandbox)));
g.logger.info("Dumping representation of sandbox which can be used for expectation annotations");
for (let entry of Object.entries(Cu.waiveXrays(sandbox)).sort((a, b) => a[0].localeCompare(b[0]))) {
let value = typeof entry[1] === "object" ? JSON.stringify(entry[1]) : entry[1];
g.logger.info(` ${entry[0]}: ${value}`);
}
g.dumpedConditionSandbox = true;
}