Change QpackEncoderStreamSenderTests to use a mock delegate.

Since QpackEncoderStreamSender has been converted to use
QpackInstructionEncoder, it is guaranteed to call Delegate::Write() exactly once
per instruction sent.  Document this in the header file.  Also, this allows
tests to use a mock delegate, and have one expected call per instruction
encoded, which makes it easier to identify what fragment of the encoded data
belongs to each instruction.

This CL merges internal changes 222418576 and 225631270 by bnc.

Change-Id: Ibbb0d8c1c56711026e3e46eb2ecac503672f36ca
Reviewed-on: https://chromium-review.googlesource.com/c/1378577
Commit-Queue: Bence Béky <bnc@chromium.org>
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616978}
2 files changed