Bug 1405709 - Add missing await to browser.pkcs11 test suite r?zombie
MozReview-Commit-ID: GjQu8QzwHkZ
--- a/browser/components/extensions/test/xpcshell/test_ext_pkcs11_management.js
+++ b/browser/components/extensions/test/xpcshell/test_ext_pkcs11_management.js
@@ -91,17 +91,17 @@ async function setupManifests(modules) {
}
add_task(async function test_pkcs11() {
async function background() {
try {
let isInstalled = await browser.pkcs11.isModuleInstalled("testmodule");
browser.test.assertFalse(isInstalled, "PKCS#11 module is not installed before we install it");
await browser.pkcs11.installModule("testmodule", 0);
- isInstalled = browser.pkcs11.isModuleInstalled("testmodule");
+ isInstalled = await browser.pkcs11.isModuleInstalled("testmodule");
browser.test.assertTrue(isInstalled, "PKCS#11 module is installed after we install it");
let slots = await browser.pkcs11.getModuleSlots("testmodule");
browser.test.assertEq("Test PKCS11 Slot", slots[0].name, "The first slot name matches the expected name");
browser.test.assertEq("Test PKCS11 Slot 二", slots[1].name, "The second slot name matches the expected name");
browser.test.assertTrue(slots[1].token, "The second slot has a token");
browser.test.assertEq("Test PKCS11 Tokeñ 2 Label", slots[1].token.name, "The token name matches the expected name");
browser.test.assertEq("Test PKCS11 Manufacturer ID", slots[1].token.manufacturer, "The token manufacturer matches the expected manufacturer");
browser.test.assertEq("0.0", slots[1].token.HWVersion, "The token hardware version matches the expected version");