Moves test utilities from //third_party/spdy/test_tools/ to //third_party/http2/test_tools/.
Protected by test utilities only, not protected.
PiperOrigin-RevId: 650774086
diff --git a/build/source_list.bzl b/build/source_list.bzl
index d1384fc..9e7e6df 100644
--- a/build/source_list.bzl
+++ b/build/source_list.bzl
@@ -779,9 +779,11 @@
"http2/test_tools/http2_structure_decoder_test_util.h",
"http2/test_tools/http2_structures_test_util.h",
"http2/test_tools/http2_trace_printer.h",
+ "http2/test_tools/mock_spdy_framer_visitor.h",
"http2/test_tools/payload_decoder_base_test_util.h",
"http2/test_tools/random_decoder_test_base.h",
"http2/test_tools/random_util.h",
+ "http2/test_tools/spdy_test_utils.h",
"http2/test_tools/verify_macros.h",
"quic/platform/api/quic_expect_bug.h",
"quic/platform/api/quic_test.h",
@@ -860,8 +862,6 @@
"quic/test_tools/test_ticket_crypter.h",
"quic/test_tools/web_transport_resets_backend.h",
"quic/test_tools/web_transport_test_tools.h",
- "spdy/test_tools/mock_spdy_framer_visitor.h",
- "spdy/test_tools/spdy_test_utils.h",
"web_transport/test_tools/mock_web_transport.h",
]
quiche_test_support_srcs = [
@@ -886,9 +886,11 @@
"http2/test_tools/http2_structure_decoder_test_util.cc",
"http2/test_tools/http2_structures_test_util.cc",
"http2/test_tools/http2_trace_printer.cc",
+ "http2/test_tools/mock_spdy_framer_visitor.cc",
"http2/test_tools/payload_decoder_base_test_util.cc",
"http2/test_tools/random_decoder_test_base.cc",
"http2/test_tools/random_util.cc",
+ "http2/test_tools/spdy_test_utils.cc",
"quic/test_tools/bad_packet_writer.cc",
"quic/test_tools/crypto_test_utils.cc",
"quic/test_tools/failing_proof_source.cc",
@@ -954,8 +956,6 @@
"quic/test_tools/test_ip_packets.cc",
"quic/test_tools/test_ticket_crypter.cc",
"quic/test_tools/web_transport_resets_backend.cc",
- "spdy/test_tools/mock_spdy_framer_visitor.cc",
- "spdy/test_tools/spdy_test_utils.cc",
]
balsa_hdrs = [
"balsa/balsa_enums.h",
diff --git a/build/source_list.gni b/build/source_list.gni
index d6016bf..d0adb30 100644
--- a/build/source_list.gni
+++ b/build/source_list.gni
@@ -779,9 +779,11 @@
"src/quiche/http2/test_tools/http2_structure_decoder_test_util.h",
"src/quiche/http2/test_tools/http2_structures_test_util.h",
"src/quiche/http2/test_tools/http2_trace_printer.h",
+ "src/quiche/http2/test_tools/mock_spdy_framer_visitor.h",
"src/quiche/http2/test_tools/payload_decoder_base_test_util.h",
"src/quiche/http2/test_tools/random_decoder_test_base.h",
"src/quiche/http2/test_tools/random_util.h",
+ "src/quiche/http2/test_tools/spdy_test_utils.h",
"src/quiche/http2/test_tools/verify_macros.h",
"src/quiche/quic/platform/api/quic_expect_bug.h",
"src/quiche/quic/platform/api/quic_test.h",
@@ -860,8 +862,6 @@
"src/quiche/quic/test_tools/test_ticket_crypter.h",
"src/quiche/quic/test_tools/web_transport_resets_backend.h",
"src/quiche/quic/test_tools/web_transport_test_tools.h",
- "src/quiche/spdy/test_tools/mock_spdy_framer_visitor.h",
- "src/quiche/spdy/test_tools/spdy_test_utils.h",
"src/quiche/web_transport/test_tools/mock_web_transport.h",
]
quiche_test_support_srcs = [
@@ -886,9 +886,11 @@
"src/quiche/http2/test_tools/http2_structure_decoder_test_util.cc",
"src/quiche/http2/test_tools/http2_structures_test_util.cc",
"src/quiche/http2/test_tools/http2_trace_printer.cc",
+ "src/quiche/http2/test_tools/mock_spdy_framer_visitor.cc",
"src/quiche/http2/test_tools/payload_decoder_base_test_util.cc",
"src/quiche/http2/test_tools/random_decoder_test_base.cc",
"src/quiche/http2/test_tools/random_util.cc",
+ "src/quiche/http2/test_tools/spdy_test_utils.cc",
"src/quiche/quic/test_tools/bad_packet_writer.cc",
"src/quiche/quic/test_tools/crypto_test_utils.cc",
"src/quiche/quic/test_tools/failing_proof_source.cc",
@@ -954,8 +956,6 @@
"src/quiche/quic/test_tools/test_ip_packets.cc",
"src/quiche/quic/test_tools/test_ticket_crypter.cc",
"src/quiche/quic/test_tools/web_transport_resets_backend.cc",
- "src/quiche/spdy/test_tools/mock_spdy_framer_visitor.cc",
- "src/quiche/spdy/test_tools/spdy_test_utils.cc",
]
balsa_hdrs = [
"src/quiche/balsa/balsa_enums.h",
diff --git a/build/source_list.json b/build/source_list.json
index f2b726e..1b3d123 100644
--- a/build/source_list.json
+++ b/build/source_list.json
@@ -778,9 +778,11 @@
"quiche/http2/test_tools/http2_structure_decoder_test_util.h",
"quiche/http2/test_tools/http2_structures_test_util.h",
"quiche/http2/test_tools/http2_trace_printer.h",
+ "quiche/http2/test_tools/mock_spdy_framer_visitor.h",
"quiche/http2/test_tools/payload_decoder_base_test_util.h",
"quiche/http2/test_tools/random_decoder_test_base.h",
"quiche/http2/test_tools/random_util.h",
+ "quiche/http2/test_tools/spdy_test_utils.h",
"quiche/http2/test_tools/verify_macros.h",
"quiche/quic/platform/api/quic_expect_bug.h",
"quiche/quic/platform/api/quic_test.h",
@@ -859,8 +861,6 @@
"quiche/quic/test_tools/test_ticket_crypter.h",
"quiche/quic/test_tools/web_transport_resets_backend.h",
"quiche/quic/test_tools/web_transport_test_tools.h",
- "quiche/spdy/test_tools/mock_spdy_framer_visitor.h",
- "quiche/spdy/test_tools/spdy_test_utils.h",
"quiche/web_transport/test_tools/mock_web_transport.h"
],
"quiche_test_support_srcs": [
@@ -885,9 +885,11 @@
"quiche/http2/test_tools/http2_structure_decoder_test_util.cc",
"quiche/http2/test_tools/http2_structures_test_util.cc",
"quiche/http2/test_tools/http2_trace_printer.cc",
+ "quiche/http2/test_tools/mock_spdy_framer_visitor.cc",
"quiche/http2/test_tools/payload_decoder_base_test_util.cc",
"quiche/http2/test_tools/random_decoder_test_base.cc",
"quiche/http2/test_tools/random_util.cc",
+ "quiche/http2/test_tools/spdy_test_utils.cc",
"quiche/quic/test_tools/bad_packet_writer.cc",
"quiche/quic/test_tools/crypto_test_utils.cc",
"quiche/quic/test_tools/failing_proof_source.cc",
@@ -952,9 +954,7 @@
"quiche/quic/test_tools/test_certificates.cc",
"quiche/quic/test_tools/test_ip_packets.cc",
"quiche/quic/test_tools/test_ticket_crypter.cc",
- "quiche/quic/test_tools/web_transport_resets_backend.cc",
- "quiche/spdy/test_tools/mock_spdy_framer_visitor.cc",
- "quiche/spdy/test_tools/spdy_test_utils.cc"
+ "quiche/quic/test_tools/web_transport_resets_backend.cc"
],
"balsa_hdrs": [
"quiche/balsa/balsa_enums.h",
diff --git a/quiche/common/http/http_header_block_test.cc b/quiche/common/http/http_header_block_test.cc
index 9a05bb9..78deb71 100644
--- a/quiche/common/http/http_header_block_test.cc
+++ b/quiche/common/http/http_header_block_test.cc
@@ -8,8 +8,8 @@
#include <string>
#include <utility>
+#include "quiche/http2/test_tools/spdy_test_utils.h"
#include "quiche/common/platform/api/quiche_test.h"
-#include "quiche/spdy/test_tools/spdy_test_utils.h"
using ::testing::ElementsAre;
diff --git a/quiche/http2/adapter/event_forwarder_test.cc b/quiche/http2/adapter/event_forwarder_test.cc
index 5e89504..bb886ae 100644
--- a/quiche/http2/adapter/event_forwarder_test.cc
+++ b/quiche/http2/adapter/event_forwarder_test.cc
@@ -4,9 +4,9 @@
#include "absl/strings/string_view.h"
#include "quiche/http2/adapter/http2_protocol.h"
+#include "quiche/http2/test_tools/mock_spdy_framer_visitor.h"
#include "quiche/common/platform/api/quiche_test.h"
#include "quiche/spdy/core/spdy_protocol.h"
-#include "quiche/spdy/test_tools/mock_spdy_framer_visitor.h"
namespace http2 {
namespace adapter {
diff --git a/quiche/http2/core/priority_write_scheduler_test.cc b/quiche/http2/core/priority_write_scheduler_test.cc
index 96c4bd2..4ac72bc 100644
--- a/quiche/http2/core/priority_write_scheduler_test.cc
+++ b/quiche/http2/core/priority_write_scheduler_test.cc
@@ -4,10 +4,10 @@
#include "quiche/http2/core/priority_write_scheduler.h"
+#include "quiche/http2/test_tools/spdy_test_utils.h"
#include "quiche/common/platform/api/quiche_expect_bug.h"
#include "quiche/common/platform/api/quiche_test.h"
#include "quiche/spdy/core/spdy_protocol.h"
-#include "quiche/spdy/test_tools/spdy_test_utils.h"
namespace http2 {
namespace test {
diff --git a/quiche/spdy/test_tools/mock_spdy_framer_visitor.cc b/quiche/http2/test_tools/mock_spdy_framer_visitor.cc
similarity index 85%
rename from quiche/spdy/test_tools/mock_spdy_framer_visitor.cc
rename to quiche/http2/test_tools/mock_spdy_framer_visitor.cc
index 079ff37..22933e6 100644
--- a/quiche/spdy/test_tools/mock_spdy_framer_visitor.cc
+++ b/quiche/http2/test_tools/mock_spdy_framer_visitor.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "quiche/spdy/test_tools/mock_spdy_framer_visitor.h"
+#include "quiche/http2/test_tools/mock_spdy_framer_visitor.h"
namespace spdy {
diff --git a/quiche/spdy/test_tools/mock_spdy_framer_visitor.h b/quiche/http2/test_tools/mock_spdy_framer_visitor.h
similarity index 95%
rename from quiche/spdy/test_tools/mock_spdy_framer_visitor.h
rename to quiche/http2/test_tools/mock_spdy_framer_visitor.h
index 3369d26..e873d6f 100644
--- a/quiche/spdy/test_tools/mock_spdy_framer_visitor.h
+++ b/quiche/http2/test_tools/mock_spdy_framer_visitor.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef QUICHE_SPDY_TEST_TOOLS_MOCK_SPDY_FRAMER_VISITOR_H_
-#define QUICHE_SPDY_TEST_TOOLS_MOCK_SPDY_FRAMER_VISITOR_H_
+#ifndef QUICHE_HTTP2_TEST_TOOLS_MOCK_SPDY_FRAMER_VISITOR_H_
+#define QUICHE_HTTP2_TEST_TOOLS_MOCK_SPDY_FRAMER_VISITOR_H_
#include <cstddef>
#include <cstdint>
@@ -19,6 +19,7 @@
#include "quiche/spdy/core/spdy_headers_handler_interface.h"
#include "quiche/spdy/core/spdy_protocol.h"
+// TODO(b/318698478): fix namespace and class name
namespace spdy {
namespace test {
@@ -126,4 +127,4 @@
} // namespace spdy
-#endif // QUICHE_SPDY_TEST_TOOLS_MOCK_SPDY_FRAMER_VISITOR_H_
+#endif // QUICHE_HTTP2_TEST_TOOLS_MOCK_SPDY_FRAMER_VISITOR_H_
diff --git a/quiche/spdy/test_tools/spdy_test_utils.cc b/quiche/http2/test_tools/spdy_test_utils.cc
similarity index 98%
rename from quiche/spdy/test_tools/spdy_test_utils.cc
rename to quiche/http2/test_tools/spdy_test_utils.cc
index fed9c16..70f30c8 100644
--- a/quiche/spdy/test_tools/spdy_test_utils.cc
+++ b/quiche/http2/test_tools/spdy_test_utils.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "quiche/spdy/test_tools/spdy_test_utils.h"
+#include "quiche/http2/test_tools/spdy_test_utils.h"
#include <algorithm>
#include <cstdint>
diff --git a/quiche/spdy/test_tools/spdy_test_utils.h b/quiche/http2/test_tools/spdy_test_utils.h
similarity index 85%
rename from quiche/spdy/test_tools/spdy_test_utils.h
rename to quiche/http2/test_tools/spdy_test_utils.h
index 5cf40cf..1db9439 100644
--- a/quiche/spdy/test_tools/spdy_test_utils.h
+++ b/quiche/http2/test_tools/spdy_test_utils.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef QUICHE_SPDY_TEST_TOOLS_SPDY_TEST_UTILS_H_
-#define QUICHE_SPDY_TEST_TOOLS_SPDY_TEST_UTILS_H_
+#ifndef QUICHE_HTTP2_TEST_TOOLS_SPDY_TEST_UTILS_H_
+#define QUICHE_HTTP2_TEST_TOOLS_SPDY_TEST_UTILS_H_
#include <cstddef>
#include <cstdint>
@@ -13,6 +13,7 @@
#include "quiche/spdy/core/http2_header_block.h"
#include "quiche/spdy/core/spdy_protocol.h"
+// TODO(b/318698478): update the namespace and file name
namespace spdy {
inline bool operator==(absl::string_view x,
@@ -42,4 +43,4 @@
} // namespace test
} // namespace spdy
-#endif // QUICHE_SPDY_TEST_TOOLS_SPDY_TEST_UTILS_H_
+#endif // QUICHE_HTTP2_TEST_TOOLS_SPDY_TEST_UTILS_H_
diff --git a/quiche/quic/core/http/quic_headers_stream_test.cc b/quiche/quic/core/http/quic_headers_stream_test.cc
index 20bad67..2c7e226 100644
--- a/quiche/quic/core/http/quic_headers_stream_test.cc
+++ b/quiche/quic/core/http/quic_headers_stream_test.cc
@@ -14,6 +14,7 @@
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
+#include "quiche/http2/test_tools/spdy_test_utils.h"
#include "quiche/quic/core/crypto/null_encrypter.h"
#include "quiche/quic/core/http/spdy_utils.h"
#include "quiche/quic/core/quic_data_writer.h"
@@ -33,7 +34,6 @@
#include "quiche/spdy/core/recording_headers_handler.h"
#include "quiche/spdy/core/spdy_alt_svc_wire_format.h"
#include "quiche/spdy/core/spdy_protocol.h"
-#include "quiche/spdy/test_tools/spdy_test_utils.h"
using spdy::ERROR_CODE_PROTOCOL_ERROR;
using spdy::Http2HeaderBlock;
diff --git a/quiche/spdy/core/spdy_frame_builder_test.cc b/quiche/spdy/core/spdy_frame_builder_test.cc
index 647d084..a4f5ac4 100644
--- a/quiche/spdy/core/spdy_frame_builder_test.cc
+++ b/quiche/spdy/core/spdy_frame_builder_test.cc
@@ -9,11 +9,11 @@
#include <cstring>
#include "absl/strings/string_view.h"
+#include "quiche/http2/test_tools/spdy_test_utils.h"
#include "quiche/common/platform/api/quiche_export.h"
#include "quiche/common/platform/api/quiche_test.h"
#include "quiche/spdy/core/array_output_buffer.h"
#include "quiche/spdy/core/spdy_protocol.h"
-#include "quiche/spdy/test_tools/spdy_test_utils.h"
namespace spdy {
diff --git a/quiche/spdy/core/spdy_framer_test.cc b/quiche/spdy/core/spdy_framer_test.cc
index 7dc0a1a..0e4cb03 100644
--- a/quiche/spdy/core/spdy_framer_test.cc
+++ b/quiche/spdy/core/spdy_framer_test.cc
@@ -19,6 +19,8 @@
#include "absl/base/macros.h"
#include "absl/strings/string_view.h"
#include "quiche/http2/hpack/hpack_encoder.h"
+#include "quiche/http2/test_tools/mock_spdy_framer_visitor.h"
+#include "quiche/http2/test_tools/spdy_test_utils.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/platform/api/quiche_test.h"
#include "quiche/common/quiche_text_utils.h"
@@ -31,8 +33,6 @@
#include "quiche/spdy/core/spdy_frame_builder.h"
#include "quiche/spdy/core/spdy_headers_handler_interface.h"
#include "quiche/spdy/core/spdy_protocol.h"
-#include "quiche/spdy/test_tools/mock_spdy_framer_visitor.h"
-#include "quiche/spdy/test_tools/spdy_test_utils.h"
using ::http2::Http2DecoderAdapter;
using ::testing::_;