Update TestPlayerRunHelper to fail on non-fatal errors by default

Also introduce a fluent API that allows callers to ignore non-fatal
errors (while avoiding adding boolean overloads for every method).

**Most** tests want to fail on non-fatal errors (since they likely
indicate user-visible issues like codec errors etc), only tests
explicitly testing fallback in error scenarios should want to ignore
them.

Before this change there were a few `playUntilXXX` methods. These can
now all be triggered via `play(player).untilXXX`, which means
effectively every 'until' condition is available in a 'play until'
variant that calls `play` just before waiting for the condition.

PiperOrigin-RevId: 608988234
This commit is contained in:
ibaker 2024-02-21 07:36:34 -08:00 committed by Copybara-Service
parent 2e9cc2784f
commit bb5c688543
2 changed files with 652 additions and 178 deletions

View File

@ -50,6 +50,11 @@
* Cast Extension: * Cast Extension:
* Test Utilities: * Test Utilities:
* Implement `onInit()` and `onRelease()` in `FakeRenderer`. * Implement `onInit()` and `onRelease()` in `FakeRenderer`.
* Change `TestPlayerRunHelper.runUntil/playUntil` methods to fail on
non-fatal errors (e.g. those reported to
`AnalyticsListener.onVideoCodecError`). Use the new
`TestPlayerRunHelper.run(player).ignoringNonFatalErrors().untilXXX()`
method chain to disable this behavior.
* Remove deprecated symbols: * Remove deprecated symbols:
* Demo app: * Demo app: