We have tests that test proxy behaviors by requesting URLs to localhost and routing those through the proxy (in some cases using the same host or URL between the proxy and target server).
Except for cases where the test is explicitly trying to validate an ability to proxy localhost addresses, tests are better written using a totally different URL. This makes them more robust (if the proxying is not setup the URL fetch will definitely fail), and it also ensures that tests use a standard proxying configuration (proxying localhost is not a default behavior on macOS and Windows and needs a special proxy bypass rule).
Comment 1 by eroman@chromium.org
, Nov 6