discardable-memory: Fix discardable memory backing trial unit tests
This fixes two issues with the discardable memory backing trial unit tests: 1. The return value of GetDiscardableMemoryBacking() was memoized on a per-process basis, persisting across tests. This caused the tests to erroneously fail. Since the function was not heavy in the first place, remove the memoization. 2. The ScopedFeatureList was mistakenly initialized after querying trial state, causing the tests to vacuously pass. Move the initialization before the query. This change does not affect the field trial behaviour, and only fixes the unit tests. Bug: 1014513 Change-Id: I200ddd87e4a8dd52ceba730a9e242f2f7167c029 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1944607Reviewed-by:Michael Thiessen <mthiesse@chromium.org> Reviewed-by:
François Doray <fdoray@chromium.org> Commit-Queue: Gordon Guan <gordonguan@google.com> Cr-Commit-Position: refs/heads/master@{#720516}
Showing
Please register or sign in to comment