mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-02-08 00:21:11 +01:00
Especially on slower bots there is some time between clicking the element and the actual visibility change, but we didn't await this and checked the visibility state immediately after clicking. This can be reproduced 100% of the time by introducing a delay in the `display` and `hidden` handlers of the `_commonActions` shadow call. This commit fixes the problem by waiting until the first visibility change actually happened before continuing with the assertions.