chrome.webstore.install() can respond with errors both from the renderer and from the browser. In the renderer, this can also be by throwing an error, rather than responding to the failure callback. It's difficult to change either of these cases since we don't know who may be relying on them.
One case that accentuates this is the case of having a pending install, where if the install is triggered by the same JS context, the renderer throws an exception, and otherwise the browser responds with an error.
We also currently only test the case of calling from the same JS context.
See also discussion at https://codereview.chromium.org/2103663002/diff/40001/chrome/browser/extensions/tab_helper.cc#newcode447
Note that if anyone wants to add a test for the separate JS contexts, an easy way would probably be by using a content script (or maybe from window.open, but I think we disallow installs from popups).
Comment 1 by sheriffbot@chromium.org
, Jun 30 2017Status: Untriaged (was: Available)