• Elly Fong-Jones's avatar
    flags: don't depend on real flags in tests · abd2f801
    Elly Fong-Jones authored
    The flag 'unsafely-treat-insecure-origin-as-secure' was being used in
    this test to test the behavior of ORIGIN_LIST_VALUE_TYPE flags; that
    made it impossible for that flag to expire or be removed without
    breaking the test. This change:
    
    1) Introduces about_flags::testing::SetFeatureEntries() to override the
       flags list for testing purposes
    2) Has AboutFlagsBrowserTest use it to set the flag set to a single test
       flag. As a side-effect, this hugely speeds up this test suite since
       the page now contains far less data.
    3) Undoes a bit of confusion in the tests: they treated "switch" and
       "flag" as synonyms throughout, which is not correct.
    
    A followup change will fix https://crbug.com/1010678 and re-enable these
    tests on the bots.
    
    Bug: 1010678
    Change-Id: I91f39fb8b3e000a824d8cf85fd3daa51d9a247af
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872318
    Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
    Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#707927}
    abd2f801
about_flags_browsertest.cc 10.2 KB