extensions: robustify some ExtensionInstall tests
These tests end with an asynchronous close of the dialog's widget. This means that, depending on the current weather, either the view under test (owned by the widget) will be destroyed before or after the test ends. This *currently* doesn't usually cause problems, because Widget::Close calls DialogDelegate::Cancel, which sets the object's state so that ~ExtensionInstallDialogView doesn't do anything. However, if ::Cancel is ever not called, these tests will start to flakily pass or fail depending on whether the async close finishes before or after the test ends. This change causes the tests to wait for the close to complete, to make their execution deterministic. It also removes some dead code. As part of "fixing" issue 851167, r566186 added a MAYBE stanza for one of these tests, but never actually used it. Bug: 851167 Change-Id: Ifeac4c7791a79ea8a7c9fab7c398ea87bd62646a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136866Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#756820}
Showing
Please register or sign in to comment