Bug 1463088 - Whitelist self-assigns in browser/base/content/test/plugins/ ready for the next version of ESLint. r?jimm
MozReview-Commit-ID: 67uodWaF8sO
--- a/browser/base/content/test/plugins/browser_plugin_reloading.js
+++ b/browser/base/content/test/plugins/browser_plugin_reloading.js
@@ -61,16 +61,17 @@ add_task(async function() {
pluginInfo = await promiseForPluginInfo("test");
is(pluginInfo.displayedType, Ci.nsIObjectLoadingContent.TYPE_PLUGIN, "Test 3, plugin should have started");
ok(pluginInfo.activated, "Test 4, plugin node should not be activated");
await ContentTask.spawn(gTestBrowser, null, async function() {
let plugin = content.document.getElementById("test");
let npobj1 = Cu.waiveXrays(plugin).getObjectValue();
+ // eslint-disable-next-line no-self-assign
plugin.src = plugin.src;
let pluginsDiffer = false;
try {
Cu.waiveXrays(plugin).checkObjectValue(npobj1);
} catch (e) {
pluginsDiffer = true;
}
--- a/browser/base/content/test/plugins/head.js
+++ b/browser/base/content/test/plugins/head.js
@@ -169,16 +169,17 @@ function promiseObjectValueResult(aId, a
});
}
// Return a promise and reload the target plugin in the page
function promiseReloadPlugin(aId, aBrowser) {
let browser = aBrowser || gTestBrowser;
return ContentTask.spawn(browser, aId, async function(contentId) {
let plugin = content.document.getElementById(contentId);
+ // eslint-disable-next-line no-self-assign
plugin.src = plugin.src;
});
}
// after a test is done using the plugin doorhanger, we should just clear
// any permissions that may have crept in
function clearAllPluginPermissions() {
let perms = Services.perms.enumerator;