Implement TestHttpResponse.getContentEncoding.

Closes #1219.