forked from mirrors/gecko-dev
Bug 1508992 - Enable ESLint for dom/plugin/test/unit (Manual Changes). r=qdot
Depends on D22365 Differential Revision: https://phabricator.services.mozilla.com/D22366 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e3317e4347
commit
45d3b3663d
5 changed files with 8 additions and 10 deletions
|
|
@ -189,7 +189,6 @@ dom/network/**
|
|||
dom/payments/**
|
||||
dom/performance/**
|
||||
dom/permission/**
|
||||
dom/plugins/test/unit/**
|
||||
dom/promise/**
|
||||
dom/push/**
|
||||
dom/quota/**
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||
const gIsWindows = mozinfo.os == "win";
|
||||
const gIsOSX = mozinfo.os == "mac";
|
||||
const gIsLinux = mozinfo.os == "linux";
|
||||
const gDirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
|
||||
const gDirSvc = Services.dirsvc;
|
||||
|
||||
function allow_all_plugins() {
|
||||
Services.prefs.setBoolPref("plugin.load_flash_only", false);
|
||||
|
|
@ -52,8 +52,7 @@ function do_get_profile_startup() {
|
|||
.createInstance(Ci.nsIFile);
|
||||
file.initWithPath(profd);
|
||||
|
||||
let dirSvc = Cc["@mozilla.org/file/directory_service;1"]
|
||||
.getService(Ci.nsIProperties);
|
||||
let dirSvc = Services.dirsvc;
|
||||
let provider = {
|
||||
getFile(prop, persistent) {
|
||||
persistent.value = true;
|
||||
|
|
@ -90,8 +89,7 @@ function get_platform_specific_plugin_suffix() {
|
|||
}
|
||||
|
||||
function get_test_plugin_no_symlink() {
|
||||
let dirSvc = Cc["@mozilla.org/file/directory_service;1"]
|
||||
.getService(Ci.nsIProperties);
|
||||
let dirSvc = Services.dirsvc;
|
||||
for (let dir of dirSvc.get("APluginsDL", Ci.nsISimpleEnumerator)) {
|
||||
let plugin = dir.clone();
|
||||
plugin.append(get_platform_specific_plugin_name());
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ function run_test() {
|
|||
// Initialises a profile folder
|
||||
do_get_profile();
|
||||
|
||||
var plugin = get_test_plugintag();
|
||||
plugin = get_test_plugintag();
|
||||
Assert.equal(false, plugin == null);
|
||||
|
||||
// Clean up
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@ var DELIM = mozinfo.os == "win" ? "|" : ":";
|
|||
|
||||
var gProfD = do_get_profile_startup();
|
||||
|
||||
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
// Writes out some plugin registry to the profile
|
||||
function write_registry(version, info) {
|
||||
let runtime = Cc["@mozilla.org/xre/runtime;1"].getService(Ci.nsIXULRuntime);
|
||||
let runtime = Services.appinfo;
|
||||
|
||||
var header = "Generated File. Do not edit.\n\n";
|
||||
header += "[HEADER]\n";
|
||||
|
|
@ -72,7 +74,7 @@ function run_test() {
|
|||
// Initialise profile folder
|
||||
do_get_profile();
|
||||
|
||||
var plugin = get_test_plugintag();
|
||||
plugin = get_test_plugintag();
|
||||
if (!plugin)
|
||||
do_throw("Plugin tag not found");
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ function run_test() {
|
|||
let nonDefaultState = (pluginDefaultState != Ci.nsIPluginTag.STATE_ENABLED ?
|
||||
Ci.nsIPluginTag.STATE_ENABLED :
|
||||
Ci.nsIPluginTag.STATE_CLICKTOPLAY);
|
||||
let ph = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
|
||||
let testPlugin = get_test_plugintag();
|
||||
// the test plugin should have the default enabledState
|
||||
Assert.equal(testPlugin.enabledState, pluginDefaultState);
|
||||
|
|
|
|||
Loading…
Reference in a new issue