Created
November 21, 2017 20:34
-
-
Save bobsilverberg/02dd27122c6d87936d3e5a406ff7722e to your computer and use it in GitHub Desktop.
This file contains 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
add_task(async function test_exceptions() { | |
async function background() { | |
await browser.test.assertRejects( | |
browser.browserSettings.contextMenuShowEvent.set({value: "bad"}), | |
/bad is not a valid value for contextMenuShowEvent/, | |
"contextMenuShowEvent.set rejects with an invalid value."); | |
browser.test.sendMessage("done"); | |
} | |
let extension = ExtensionTestUtils.loadExtension({ | |
background, | |
manifest: { | |
permissions: ["browserSettings"], | |
}, | |
useAddonManager: "temporary", | |
}); | |
await promiseStartupManager(); | |
await extension.startup(); | |
await extension.awaitMessage("done"); | |
await extension.unload(); | |
await promiseShutdownManager(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment