Bug 1463088 - Whitelist self-assigns in browser/base/content/test/plugins/ ready for the next version of ESLint. r?jimm draft
authorMark Banner <standard8@mozilla.com>
Thu, 07 Jun 2018 14:42:37 +0100
changeset 805207 1223845596c057e2d4093721d4ae54f1920fb845
parent 805066 f7fd9b08c0156be5b5cd99de5ed0ed0b98d93051
push id112592
push userbmo:standard8@mozilla.com
push dateThu, 07 Jun 2018 13:43:15 +0000
reviewersjimm
bugs1463088
milestone62.0a1
Bug 1463088 - Whitelist self-assigns in browser/base/content/test/plugins/ ready for the next version of ESLint. r?jimm MozReview-Commit-ID: 67uodWaF8sO
browser/base/content/test/plugins/browser_plugin_reloading.js
browser/base/content/test/plugins/head.js
--- 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;