Fix nested Scoped*ForTest when the inner is implied by the outer
Previously, if feature A implies B, suppose both are disabled by default, in the following situation: ScopedAForTest a; ScopedBForTest b; feature B will be left enabled after the scope. Now let Scoped*ForTest use the data field of the feature instead of calling *Enabled() and Set*Enabled() (which are asymmetric when the feature is implied). RuntimeEnabledFeature backup and restore had the similar issue. Also let them use data field instead of calling the methods. Bug: 1061443 Change-Id: I28bfee510bf3e4491c11887d7f8c992d433b9702 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103317Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#750430}
Showing
Please register or sign in to comment