Tests that mess with base::FeatureList use base::FeatureList::SetInstance and base::FeatureList::ClearInstanceForTesting, but this modifies global state. It seems very easy to write a test that leaves temporary features enabled or clears the global FeatureList (causing things to crash).
Probably a better pattern would be some kind of ScopedFeatureListInstance that takes a std::unique_ptr<base::FeatureList> and undoes its change afterwards. (I tried writing such a thing but there's a bit of a nuisance with initialized_'s DCHECK.)
Comment 1 by jww@chromium.org
, Jun 15 2016