Reland of Change ScopedFeatureList to overrides FeatureList not reset

The current situation is that using ScopedFeatureList resets to an
empty feature list and then enables/disables an explicit list of
features.

That's never what you want for browser tests (or other higher-level
tests) since it effectively overrides higher-level test configurations
(e.g. those in fieldtrial_testing_config.json, or a bot set up to
specifically test a feature).

In this patch:

1. Keep SFL::Init, SFL::InitWithFeatureList,
   SFL::InitFromCommandLine reset to empty list but add warning to
   remind developer should use them with care.
2. Change SFL::InitAndEnableFeature, SFL::InitAndDisableFeature and
   SFL::InitWithFeatures to not reset but override current FeatureList
   with given enables/disables.

We also add unit tests for ScopedFeatureList.

BUG=713390
Original-Review-Url: https://codereview.chromium.org/2834583002
Review-Url: https://codereview.chromium.org/2968793002
Cr-Commit-Position: refs/heads/master@{#484921}


CrOS-Libchrome-Original-Commit: e86c74ee8e06e2a7538b273efe5e4f17fc0c38f9
3 files changed
tree: a1473e724acc014275ed7471dba39a0ba022543d
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/