This fixes up some places in code that ignored `encoded` flag from the
result of `Network.getResponseBody` and similar CDP commands, instead making
own assumptions based on "common sense" (whether it's text content type,
whether it can be parsed as-is and so on).
This works fine for Chromium either way because it upholds these assumptions,
but technically it's a violation of the protocol and makes devtools app
easily incompatible with other CDP implementations.
Change-Id: Ifbd3ad487e6f39a75795b362cc3828466ba4f775
Reviewed-on: https://chromium-review.googlesource.com/c/1230042
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#598318}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5b046432f18e81cc58d32191c8a8ad150c8b74ad