forked from google/ExoPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
expectedResolvedLength
from DataSourceContractTest
Whether a resource resolves to a known length or not is more than just a property of the resource & data source - for example if `DataSpec.flags` contains `ALLOW_GZIP` then the length might be unresolved. More generally, a `DataSource` could randomly return `C.UNKNOWN_LENGTH` from `open()` 50% of the time and still fulfil the `DataSource` interface. This makes it ~impossible to write a meaningful assertion aroun this. So this change relaxes the assertion slightly to more closely match the definition of the `DataSource` interface. We leave the `resolveToUnknownLength` toggle in `WebServerDispatcher.Resource` because this is still useful for simulating the case of a server that is serving a file it doesn't know the length of. PiperOrigin-RevId: 351124246
- Loading branch information
Showing
5 changed files
with
11 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters