| AppData.sys.mjs |
Installs a fake UAppData directory.
This is needed by tests because a UAppData directory typically isn't
present in the test environment.
We create the new UAppData directory under the profile's directory
because the profile directory is automatically cleaned as part of
test shutdown.
This returns a promise that will be resolved once the new directory
is created and installed.
|
2354 |
- |
| AppInfo.sys.mjs |
Create new XULAppInfo instance with specified options.
options is a object with following keys:
ID: nsIXULAppInfo.ID
name: nsIXULAppInfo.name
version: nsIXULAppInfo.version
platformVersion: nsIXULAppInfo.platformVersion
OS: nsIXULRuntime.OS
appBuildID: nsIXULRuntime.appBuildID
lastAppBuildID: nsIXULRuntime.lastAppBuildID
lastAppVersion: nsIXULRuntime.lastAppVersion
crashReporter: nsICrashReporter interface is implemented if true
|
3943 |
- |
| Assert.sys.mjs |
This module is based on the
`CommonJS spec <https://wiki.commonjs.org/wiki/Unit_Testing/1.0>`_
When you see a jsdoc comment that contains a number, it's a reference to a
specific section of the CommonJS spec.
1. The assert module provides functions that throw AssertionError's when
particular conditions are not met.
To use the module you may instantiate it first.
@param {reporterFunc} reporterFunc
Allows consumers to override reporting for this instance.
@param {boolean} isDefault
Used by test suites to set ``reporterFunc`` as the default
used by the global instance, which is called for example
by other test-only modules. This is false when the
reporter is set by content scripts, because they may still
run in the parent process.
@class
|
22175 |
- |
| FileTestUtils.sys.mjs |
Provides testing functions dealing with local files and their contents.
|
5097 |
- |
| ImageTestUtils.sys.mjs |
Provides testing functions working with images and image URLs.
|
1800 |
- |
| Mochia.js |
Define Mochia's helpers on the given scope.
|
6880 |
- |
| MockRegistrar.sys.mjs |
Register a mock to override target interfaces.
The target interface may be accessed through _genuine property of the mock.
If you register multiple mocks to the same contract ID, you have to call
unregister in reverse order. Otherwise the previous factory will not be
restored.
@param contractID The contract ID of the interface which is overridden by
the mock.
e.g. "@mozilla.org/file/directory_service;1"
@param mock An object which implements interfaces for the contract ID.
@param args An array which is passed in the constructor of mock.
@return The CID of the mock.
|
4666 |
- |
| MockRegistry.sys.mjs |
|
9745 |
- |
| moz.build |
|
1111 |
- |
| sinon-7.2.7.js |
|
3725552 |
- |
| Sinon.sys.mjs |
|
972 |
- |
| StructuredLog.sys.mjs |
TestLogger: Logger class generating messages compliant with the
structured logging protocol for tests exposed by mozlog
@param {string} name
The name of the logger to instantiate.
@param {function} [dumpFun]
An underlying function to be used to log raw messages. This function
will receive the complete serialized json string to log.
@param {object} [scope]
The scope that the dumpFun is loaded in, so that messages are cloned
into that scope before passing them.
|
13069 |
- |
| TestProfilerArtifact.sys.mjs |
Gather a profile, write it as a CI artifact in MOZ_UPLOAD_DIR, and report an
unmissable failure naming the artifact (in the "profile uploaded in <file>"
form the dashboards recognize) so the profile can be associated with the
failure.
Requires MOZ_UPLOAD_DIR to be set and the profiler to be active; callers are
expected to check those conditions.
@param {string} testName Test named in the reported failure.
@param {object} logger StructuredLogger used to report the failure.
@param {string} profileName Names the profile artifact file (only its
basename is used); defaults to testName.
@param {boolean} testRunning Whether a test is running. When true the failure
is reported as that test's status; when false (e.g. at shutdown) it is
reported as a top-level error instead, since a per-test status would be tied
to a test that has already ended and wouldn't reach the failure summary.
|
9041 |
- |
| tests |
|
|
- |
| TestUtils.sys.mjs |
Contains a limited number of testing functions that are commonly used in a
wide variety of situations, for example waiting for an event loop tick or an
observer notification.
More complex functions are likely to belong to a separate test-only module.
Examples include Assert.sys.mjs for generic assertions, FileTestUtils.sys.mjs
to work with local files and their contents, and BrowserTestUtils.sys.mjs to
work with browser windows and tabs.
Individual components also offer testing functions to other components, for
example LoginTestUtils.sys.mjs.
|
12794 |
- |
| XPCShellContentUtils.sys.mjs |
|
15205 |
- |