* Waits for the previously included extension to complete * loading/registration. * @param {string} extensionId * @param {string} version * @return {!Promise<?ExtensionDef>}
(extensionId, version)
| 190 | * @return {!Promise<?ExtensionDef>} |
| 191 | */ |
| 192 | waitForExtension(extensionId, version) { |
| 193 | const wait = this.waitFor_(this.getExtensionHolder_(extensionId, version)); |
| 194 | |
| 195 | return Services.timerFor(this.win) |
| 196 | .timeoutPromise(16000, wait) |
| 197 | .catch((err) => { |
| 198 | if (!err.message.includes('timeout')) { |
| 199 | throw err; |
| 200 | } |
| 201 | |
| 202 | user().error(TAG, `Waited over 16s to load extension ${extensionId}.`); |
| 203 | return wait; |
| 204 | }); |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Returns the promise that will be resolved when the extension has been |
no test coverage detected