Bug 1605854 - Fix remaining tests using uneval/toSource r=mccr8,bzbarsky

Differential Revision: https://phabricator.services.mozilla.com/D58685
This commit is contained in:
Tom Schuster
2020-01-07 13:19:30 +00:00
parent 8beb77abc4
commit 65707a860b
16 changed files with 26 additions and 37 deletions

View File

@@ -344,7 +344,7 @@ var classifierTester = {
async function fn(frame, iframeId, depth) {
return SpecialPowers.spawn(
frame,
[iframeId, depth, fn.toSource()],
[iframeId, depth, fn.toString()],
async (iframeId, depth, fnSource) => {
// eslint-disable-next-line no-eval
let fnGetIframePluginInfo = eval(`(() => (${fnSource}))()`);

View File

@@ -190,7 +190,7 @@ async function runTest(test, expectedFlag, expectedTrackingResource, prefs) {
],
];
info("Testing: " + config.toSource() + "\n");
info("Testing: " + JSON.stringify(config) + "\n");
await SpecialPowers.pushPrefEnv({ set: config.concat(prefs) });

View File

@@ -42,7 +42,7 @@ async function runTest(test) {
[ "privacy.trackingprotection.socialtracking.enabled", false ],
]});
info("Testing: " + test.config.toSource() + "\n");
info("Testing: " + JSON.stringify(test.config) + "\n");
// Let's load an image with a random query string, just to avoid network cache.
let result = await new Promise(resolve => {

View File

@@ -42,7 +42,7 @@ async function runTest(test) {
[ "privacy.trackingprotection.socialtracking.enabled", false ],
]});
info("Testing: " + test.config.toSource() + "\n");
info("Testing: " + JSON.stringify(test.config) + "\n");
// Let's load an image with a random query string, just to avoid network cache.
let result = await new Promise(resolve => {

View File

@@ -42,7 +42,7 @@ async function runTest(test) {
[ "privacy.trackingprotection.socialtracking.enabled", true ],
]});
info("Testing: " + test.config.toSource() + "\n");
info("Testing: " + JSON.stringify(test.config) + "\n");
// Let's load an image with a random query string, just to avoid network cache.
let result = await new Promise(resolve => {