Skip to content

Commit

Permalink
Bug 1392098 - Enable the new ESLint no-useless-run-test rule across t…
Browse files Browse the repository at this point in the history
…he tree. r=mossop

MozReview-Commit-ID: 35MaseieNUk
  • Loading branch information
Standard8 committed Aug 20, 2017
1 parent 07ae14e commit b85b226
Show file tree
Hide file tree
Showing 224 changed files with 1 addition and 895 deletions.
4 changes: 0 additions & 4 deletions browser/components/migration/tests/unit/test_fx_telemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

"use strict";

function run_test() {
run_next_test();
}

function readFile(file) {
let stream = Cc["@mozilla.org/network/file-input-stream;1"]
.createInstance(Ci.nsIFileInputStream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Cu.import("resource://gre/modules/Preferences.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NewTabPrefsProvider",
"resource:///modules/NewTabPrefsProvider.jsm");

function run_test() {
run_next_test();
}

add_task(async function test_observe() {
let prefsMap = NewTabPrefsProvider.prefs.prefsMap;
for (let prefName of prefsMap.keys()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "ContentSearch",
// ensure a profile exists
do_get_profile();

function run_test() {
run_next_test();
}

function hasProp(obj) {
return function(aProp) {
ok(obj.hasOwnProperty(aProp), `expect to have property ${aProp}`);
Expand Down
4 changes: 0 additions & 4 deletions browser/components/places/tests/unit/test_421483.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ var gluesvc = Cc["@mozilla.org/browser/browserglue;1"].
// Avoid default bookmarks import.
gluesvc.observe(null, "initial-migration-will-import-default-bookmarks", "");

function run_test() {
run_next_test();
}

add_task(async function smart_bookmarks_disabled() {
Services.prefs.setIntPref("browser.places.smartBookmarksVersion", -1);
await rebuildSmartBookmarks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,3 @@ add_test(function check_annotations() {
do_check_eq(others.length, 3);
run_next_test();
});

function run_test() {
run_next_test();
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ var gBrowserGlue = Cc["@mozilla.org/browser/browserglue;1"]
.getService(Ci.nsIObserver);
var gGetBoolPref = Services.prefs.getBoolPref;

function run_test() {
run_next_test();
}

do_register_cleanup(cleanup);

function cleanup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",

var timeInMicroseconds = Date.now() * 1000;

function run_test() {
run_next_test();
}

add_task(async function test_execute() {
do_print("Initialize browserglue before Places");

Expand Down
4 changes: 0 additions & 4 deletions browser/components/sessionstore/test/unit/test_backup_once.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ updateAppInfo({
platformVersion: "",
});

function run_test() {
run_next_test();
}

add_task(async function init() {
// Make sure that we have a profile before initializing SessionFile
let profd = do_get_profile();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,3 @@ add_task(async function test_all_files_corrupt() {
Assert.equal(s.counts[1], 1, "One probe for the 'true' bucket.");
Assert.equal(s.counts[0], 0, "No probes in the 'false' bucket.");
});

function run_test() {
run_next_test();
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ updateAppInfo({
platformVersion: "",
});

function run_test() {
run_next_test();
}

function promise_check_exist(path, shouldExist) {
return (async function() {
do_print("Ensuring that " + path + (shouldExist ? " exists" : " does not exist"));
Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_activate.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ function ManifestEntry(data) {
this.maxActiveSeconds = data.maxActiveSeconds || 5 * SEC_IN_ONE_DAY;
}

function run_test() {
run_next_test();
}

add_task(async function test_setup() {
loadAddonManager();
gPolicy = new Experiments.Policy();
Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ function testCleanup(experimentsInstance) {
})();
}

function run_test() {
run_next_test();
}

add_task(async function test_setup() {
loadAddonManager();

Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ var gPolicy = null;
var gManifestObject = null;
var gManifestHandlerURI = null;

function run_test() {
run_next_test();
}

add_task(async function test_setup() {
loadAddonManager();
await removeCacheFile();
Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_cacherace.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ var gPolicy = null;
var gManifestObject = null;
var gManifestHandlerURI = null;

function run_test() {
run_next_test();
}

add_task(async function test_setup() {
loadAddonManager();
await removeCacheFile();
Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ function applicableFromManifestData(data, policy) {
return entry.isApplicable();
}

function run_test() {
run_next_test();
}

add_task(async function test_setup() {
createAppInfo();
do_get_profile();
Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_disableExperiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ var gPolicy = null;
var gManifestObject = null;
var gManifestHandlerURI = null;

function run_test() {
run_next_test();
}

add_task(async function test_setup() {
loadAddonManager();

Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_nethang_bug1012924.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ Cu.import("resource:///modules/experiments/Experiments.jsm");

const MANIFEST_HANDLER = "manifests/handler";

function run_test() {
run_next_test();
}

add_task(async function test_setup() {
loadAddonManager();
do_get_profile();
Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_previous_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ var gDataRoot;
var gHttpServer;
var gManifestObject;

function run_test() {
run_next_test();
}

add_task(function test_setup() {
loadAddonManager();
do_get_profile();
Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_telemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ function checkEvent(event, id, data) {
}
}

function run_test() {
run_next_test();
}

add_task(async function test_setup() {
loadAddonManager();

Expand Down
4 changes: 0 additions & 4 deletions browser/experiments/test/xpcshell/test_upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,3 @@ add_task(async function test_missing() {
delete cacheData._name;
Assert.ok(!e.initFromCacheData(cacheData));
});

function run_test() {
run_next_test();
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ let { takeSnapshotAndCensus, clearSnapshots } = require("devtools/client/memory/
let { actions } = require("devtools/client/memory/constants");
const { treeMapState } = require("devtools/client/memory/constants");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
let { takeSnapshotAndCensus, clearSnapshots, takeSnapshot } = require("devtools/client/memory/actions/snapshot");
let { snapshotState: states, treeMapState, actions } = require("devtools/client/memory/constants");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
let { takeSnapshotAndCensus, clearSnapshots } = require("devtools/client/memory/actions/snapshot");
let { snapshotState: states, treeMapState, actions } = require("devtools/client/memory/constants");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
let { takeSnapshotAndCensus, clearSnapshots } = require("devtools/client/memory/actions/snapshot");
let { snapshotState: states, actions, treeMapState } = require("devtools/client/memory/constants");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
let { takeSnapshotAndCensus, clearSnapshots } = require("devtools/client/memory/actions/snapshot");
let { actions, treeMapState } = require("devtools/client/memory/constants");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ const {
selectSnapshotForDiffingAndRefresh
} = require("devtools/client/memory/actions/diffing");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ let { exportSnapshot } = require("devtools/client/memory/actions/io");
let { takeSnapshotAndCensus } = require("devtools/client/memory/actions/snapshot");
let { actions, treeMapState } = require("devtools/client/memory/constants");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
4 changes: 0 additions & 4 deletions devtools/client/memory/test/unit/test_action-filter-01.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

let { setFilterString } = require("devtools/client/memory/actions/filter");

function run_test() {
run_next_test();
}

add_task(function* () {
let store = Store();
const { getState, dispatch } = store;
Expand Down
4 changes: 0 additions & 4 deletions devtools/client/memory/test/unit/test_action-filter-02.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ let { setFilterStringAndRefresh } = require("devtools/client/memory/actions/filt
let { takeSnapshotAndCensus, selectSnapshotAndRefresh } = require("devtools/client/memory/actions/snapshot");
let { changeView } = require("devtools/client/memory/actions/view");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
4 changes: 0 additions & 4 deletions devtools/client/memory/test/unit/test_action-filter-03.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ let { setFilterString, setFilterStringAndRefresh } = require("devtools/client/me
let { takeSnapshotAndCensus } = require("devtools/client/memory/actions/snapshot");
let { changeView } = require("devtools/client/memory/actions/view");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ let { actions, snapshotState: states, treeMapState } = require("devtools/client/
let { exportSnapshot, importSnapshotAndCensus } = require("devtools/client/memory/actions/io");
let { takeSnapshotAndCensus } = require("devtools/client/memory/actions/snapshot");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ let { snapshotState, dominatorTreeState, viewState, treeMapState } =
let { importSnapshotAndCensus } = require("devtools/client/memory/actions/io");
let { changeViewAndRefresh } = require("devtools/client/memory/actions/view");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
let actions = require("devtools/client/memory/actions/snapshot");
let { snapshotState: states } = require("devtools/client/memory/constants");

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
yield front.attach();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ let { setCensusDisplayAndRefresh } = require("devtools/client/memory/actions/cen
let { takeSnapshotAndCensus, selectSnapshotAndRefresh } = require("devtools/client/memory/actions/snapshot");
const { changeView } = require("devtools/client/memory/actions/view");

function run_test() {
run_next_test();
}

// We test setting an invalid display, which triggers an assertion failure.
EXPECTED_DTU_ASSERT_FAILURE_COUNT = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ let CUSTOM = {
}
};

function run_test() {
run_next_test();
}

add_task(function* () {
let front = new StubbedMemoryFront();
let heapWorker = new HeapAnalysesClient();
Expand Down
4 changes: 0 additions & 4 deletions devtools/client/memory/test/unit/test_action-set-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ let { setCensusDisplay } = require("devtools/client/memory/actions/census-displa
let { takeSnapshotAndCensus } = require("devtools/client/memory/actions/snapshot");
const { changeView } = require("devtools/client/memory/actions/view");

function run_test() {
run_next_test();
}

// We test setting an invalid display, which triggers an assertion failure.
EXPECTED_DTU_ASSERT_FAILURE_COUNT = 1;

Expand Down
4 changes: 0 additions & 4 deletions devtools/client/memory/test/unit/test_action-take-census.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ var { snapshotState: states, censusDisplays, censusState, viewState } = require(
var actions = require("devtools/client/memory/actions/snapshot");
var { changeView } = require("devtools/client/memory/actions/view");

function run_test() {
run_next_test();
}

// This tests taking a census on a snapshot that is still being read, which
// triggers an assertion failure.
EXPECTED_DTU_ASSERT_FAILURE_COUNT = 1;
Expand Down
Loading

0 comments on commit b85b226

Please sign in to comment.