Code:    P2PQuicStreamTest()
      : connection_(
            new quic::test::MockQuicConnection(&connection_helper_,
                                               &alarm_factory_,
                                                quic::Perspective::IS_CLIENT)),
         session_(connection_) {
     session_.Initialize();
    stream_ = new P2PQuicStreamImpl(kStreamId, &session_);
     stream_->SetDelegate(&delegate_);
     session_.ActivateStream(std::unique_ptr<P2PQuicStreamImpl>(stream_));
    connection_helper_.AdvanceTime(quic::QuicTime::Delta::FromSeconds(1));
  }

Commit Message: P2PQuicStream write functionality.

This adds the P2PQuicStream::WriteData function and adds tests. It also
adds the concept of a write buffered amount, enforcing this at the
P2PQuicStreamImpl.

Bug: 874296
Change-Id: Id02c8aa8d5368a87bb24a2e50dab5ef94bcae131
Reviewed-on: https://chromium-review.googlesource.com/c/1315534
Commit-Queue: Seth Hampson <shampson@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605766}
CWE ID: CWE-284
   P2PQuicStreamTest()
      : connection_(
            new quic::test::MockQuicConnection(&connection_helper_,
                                               &alarm_factory_,
                                                quic::Perspective::IS_CLIENT)),
         session_(connection_) {
     session_.Initialize();
    stream_ = new P2PQuicStreamImpl(kStreamId, &session_, kWriteBufferSize);
     stream_->SetDelegate(&delegate_);
     session_.ActivateStream(std::unique_ptr<P2PQuicStreamImpl>(stream_));
    connection_helper_.AdvanceTime(quic::QuicTime::Delta::FromSeconds(1));
  }
