-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[web] flaky tests on inactive tabs: css transitions, requestAnimationFrame #53985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm also seeing a similar behavior with requestAnimationFrame API calls |
|
agree
Technically it is checking for whether it is implemented, and if not, it adds a polyfill for this feature. I believe we never hit the case of the polyfill. Most of the test is doing 1 or 2 calls to requestAnimationFrame and testing whether the callback is called as expected or whether cancelling the request works as expected. All of this is native behavior, and nothing specific about Dart IMO. FWIW - I just sent out https://dart-review.googlesource.com/c/sdk/+/335030 to start skipping these tests in Chrome for now. |
All tests skipped here are flaking or timing out. Most of them fail for a common reason tracked in #53985: Chrome inactive tabs do not run behave the same as active tabs. This means that interactions like css transitions, requestAnimationFrame, and video play don't work as expected. This CL skips the tests only on Chrome, but continues to run them in other browsers where the expectation is met. If we can in the future ensure tests are run on an active tab, we can consider reneabling these tests. That said, the value of this tests was higher when we mantained Dartium, but these days we may consider deleting them instead. Change-Id: I9c0ea230fecca16fa008b64c2cf316ccdd0f53e4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335030 Reviewed-by: Srujan Gaddam <[email protected]> Commit-Queue: Sigmund Cherem <[email protected]>
A few lib/html and co19 tests are testing CSS transitions, and these tests currently timeout or flake on Chrome.
See for example
lib/html/transition_event_test
: https://dart-current-results.web.app/#/filter=lib/html/transition_event_testThis test passes consistently in FF and Safari, but flakes on dart2js-linux-chrome nearly 90% of the time.
It appears that, like setTimeout, Chrome ignores CSS transitions on background tabs. As a simple repro, you can create a small JS program that:
transitionrun
,transitionstart
, andtransitionend
events to log when they occurWhat I observe is that all the JS timers complete and log data on the console, but the transition events do not trigger until after I reopen the tab and bring it in the foreground.
This leads me to believe we can't run these tests unless:
@whesse - are any of these possible?
@srujzs - should we just delete these tests?
The text was updated successfully, but these errors were encountered: