Unit test to mirror actual behavior
The ParentLocalSurfaceIdAllocator unit tests have a function to get a fake child-allocated LocalSurfaceId. It hard-codes values. The hard-coded parent sequence number is bad but not terrible. It forces knowledge of the calling functions. This isn't good. It can be improved. However, the embed token part is pretty bad. It forces the unit tests to assert the wrong behavior. A child allocation should use the parent's embed token. Since the hard-coded value is different, the calling tests assert that the embed tokens don't match when in reality they should. To fix these bad behaviors, the fake child allocation should take a parent allocator (or parent-allocated LocalSurfaceId) so the values can be based on what the test provides. BUG=837030 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel Change-Id: Iaa8e7b6226c0a6c6d67fa420183f24a36e7499ce Reviewed-on: https://chromium-review.googlesource.com/1036530Reviewed-by:Fady Samuel <fsamuel@chromium.org> Commit-Queue: Chris Blume <cblume@chromium.org> Cr-Commit-Position: refs/heads/master@{#554928}
Showing
Please register or sign in to comment