fune/toolkit/components/backgroundtasks/tests/xpcshell/head.js
Nick Alexander 3d768b79b3 Bug 1704146 - Pre: Extract shared BackgroundTasksTestUtils.jsm. r=bytesized,application-update-reviewers
We duplicate these functions in two head.js files right now, and I'm
loathe to add a third, so let's extract a shared test module.

Differential Revision: https://phabricator.services.mozilla.com/D111527
2021-04-14 18:21:55 +00:00

23 lines
844 B
JavaScript

/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=4 ts=4 sts=4 et
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { BackgroundTasksTestUtils } = ChromeUtils.import(
"resource://testing-common/BackgroundTasksTestUtils.jsm"
);
BackgroundTasksTestUtils.init(this);
const do_backgroundtask = BackgroundTasksTestUtils.do_backgroundtask.bind(
BackgroundTasksTestUtils
);
const setupProfileService = BackgroundTasksTestUtils.setupProfileService.bind(
BackgroundTasksTestUtils
);