• David Van Cleve's avatar
    Adds NoReferrers feature bugfix and test coverage · 143ecbc0
    David Van Cleve authored
    crrev.com/c/1808144 replaced the ancient --no-referrers
    command-line switch with a base::Feature. The change
    contained a bug and didn't add sufficient test coverage beyond
    what was already present---and there was no test coverage already
    present!
    
    This patch remedies both the bug and the lack of coverage:
    1. The bug was a failure to sync the base::Feature to a profile-scoped
    pref; the previous patch only propagated the base::Feature to a
    system-scoped (local state) pref. This is fixed by having the pref's
    default value, set in prefs_tab_helper.cc, depend on the value of the
    Feature.
    2. This patch adds additional referrer policy browsertest coverage
    to make sure that, when the NoReferrers feature is on, the browser
    sends no referrers.
    
    R=jochen
    
    Bug: 1004486
    Change-Id: Idc98b6d912dd59b23eab6eeef128e7a6992758ca
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1842040
    Commit-Queue: David Van Cleve <davidvc@chromium.org>
    Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#703492}
    143ecbc0
referrer_policy_browsertest.cc 42.3 KB