SearchTestUtils.sys.mjs |
Adds an OpenSearch based engine to the search service. It will remove
the engine at the end of the test.
@param {object} options
The options for the new search engine.
@param {string} options.url
The URL of the engine to add.
@param {boolean} [options.setAsDefault]
Whether or not to set the engine as default automatically. If this is
true, the engine will be set as default, and the previous default engine
will be restored when the test exits.
@param {boolean} [options.setAsDefaultPrivate]
Whether or not to set the engine as default automatically for private mode.
If this is true, the engine will be set as default, and the previous default
engine will be restored when the test exits.
@param {boolean} [options.skipReset]
Skips resetting the default engine at the end of the test.
@returns {Promise} Returns a promise that is resolved with the new engine
or rejected if it fails.
|
19407 |