Created
March 23, 2020 12:53
-
-
Save daleharvey/9b2257384d187ee3d8ee677947605e74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let extension = await installSearchExtension("example", "Example", "1.0"); | |
extension = await installSearchExtension("example", "Example", "2.0"); | |
async function installSearchExtension(id, name, version) { | |
let extensionInfo = { | |
useAddonManager: "permanent", | |
manifest: { | |
version, | |
applications: { | |
gecko: { | |
id: `${id}@tests.mozilla.org`, | |
}, | |
}, | |
chrome_settings_overrides: { | |
search_provider: { | |
name, | |
search_url: `https://example.com/?q={searchTerms}&version=${version}`, | |
}, | |
}, | |
}, | |
}; | |
let extension = ExtensionTestUtils.loadExtension(extensionInfo); | |
await extension.startup(); | |
return extension; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment