Add ClearControlFrame() to quic_test_utils.
This function does not have to live in a class and does not need seven identical
definitions.
gfe-relnote: n/a, test-only refactoring.
PiperOrigin-RevId: 254999491
Change-Id: I1173acb47388e3a5ca010c927c4e886d3b6ab387
diff --git a/quic/test_tools/quic_test_utils.cc b/quic/test_tools/quic_test_utils.cc
index 6ffcb8c..99c7511 100644
--- a/quic/test_tools/quic_test_utils.cc
+++ b/quic/test_tools/quic_test_utils.cc
@@ -153,6 +153,11 @@
return std::string(buffer, QUIC_ARRAYSIZE(buffer));
}
+bool ClearControlFrame(const QuicFrame& frame) {
+ DeleteFrame(&const_cast<QuicFrame&>(frame));
+ return true;
+}
+
uint64_t SimpleRandom::RandUint64() {
uint64_t result;
RandBytes(&result, sizeof(result));