Add temporary fetch() UseCounters
This CL addresses crbug.com/1072350 by adding two UseCounters: - One to count requests whose - method != ("GET" || "HEAD") - mode == kNoCors - response is opaque - Another to count requests that meet the same criteria as above, but have experienced at least one redirect. This CL also adds tests to ensure that the UseCounter is counted properly: Tests: - Not enough conditions are met for the UseCounter: - No conditions met: (GET, "cors", basic) - One condition met: (POST, "cors" basic) - One condition met: (GET, "no-cors" basic) - One condition met: (GET, "no-cors", opaqueredirect) - Two condition met: (POST, "no-cors", basic) - Two condition met: (GET, "no-cors", opaque) - All conditions are met: - (POST, "no-cors", opaque): Cross-origin, no redirect - Should count first counter, but not second - (POST, "no-cors", opaque): Cross-origin Redirect involved - Should count both UseCounters R=kinuko@chromium.org, ricea@chromium.org, yhirano@chromium.org Bug: 1072350 Change-Id: I13331a8ca51a9cdd684ddb8b88f3232117426320 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2242205 Commit-Queue: Dominic Farolino <dom@chromium.org> Reviewed-by:Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#778021}
Showing
Please register or sign in to comment