hpack_whole_entry_buffer_test: Include http2_test_helpers.h
This fixes the GCC build, which was failing with
../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h: In instantiation of ?bool testing::internal::HasSubstrMatcher<StringType>::MatchAndExplain(const MatcheeStringType&, testing::MatchResultListener*) const [with MatcheeStringType = base::BasicStringPiece<std::__cxx11::basic_string<char> >; StringType = std::__cxx11::basic_string<char>]?:
../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h:548:47: required from ?bool testing::PolymorphicMatcher<Impl>::MonomorphicImpl<T>::MatchAndExplain(T, testing::MatchResultListener*) const [with T = const base::BasicStringPiece<std::__cxx11::basic_string<char> >&; Impl = testing::internal::HasSubstrMatcher<std::__cxx11::basic_string<char> >]?
../../third_party/googletest/src/googletest/include/gtest/gtest-matchers.h:547:18: required from here
../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h:756:23: error: invalid initialization of reference of type ?const std::__cxx11::basic_string<char>&? from expression of type ?const base::BasicStringPiece<std::__cxx11::basic_string<char> >?
const StringType& s2(s);
^~
This is caused by the fact that base::StringPiece::operator std::string() is
explicit and thus StringPieces cannot be converted directly to an
std::string (GCC and MSVC fail to build a reduced version of this code,
while ICC and clang allow it; in this case it looks like GCC is in the right
here).
Fix it by including http2_test_helpers.h, which contains a HasSubstr()
specialization precisely for this reason -- hpack_whole_entry_buffer_test.cc
had this HasSubstr() specialization before
https://chromium-review.googlesource.com/c/1351102 ("Platformize
http2_bug_tracker.h, failure.h, std::deque and ABSL_DIE_IF_NULL") moved it
to a separate header that was not included by this file.
Cloned from https://quiche-review.googlesource.com/c/quiche/+/1500
gfe-relnote: n/a - Test only
PiperOrigin-RevId: 237093700
Change-Id: Ife4efda0272011811506e0d2fd01be8221c66f9e
diff --git a/http2/hpack/decoder/hpack_whole_entry_buffer_test.cc b/http2/hpack/decoder/hpack_whole_entry_buffer_test.cc
index 75b281c..0265e9c 100644
--- a/http2/hpack/decoder/hpack_whole_entry_buffer_test.cc
+++ b/http2/hpack/decoder/hpack_whole_entry_buffer_test.cc
@@ -9,6 +9,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "net/third_party/quiche/src/http2/platform/api/http2_test_helpers.h"
using ::testing::AllOf;
using ::testing::HasSubstr;