Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: net/quic/core/quic_crypto_server_stream_test.cc

Issue 2626443002: Fix QUIC crash when ProofSource::GetProof fails (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/core/quic_crypto_server_stream_test.cc
diff --git a/net/quic/core/quic_crypto_server_stream_test.cc b/net/quic/core/quic_crypto_server_stream_test.cc
index e9450454b27d6dd1bab24d924813bf747abcd7ff..1060da908164b987c54edebd9798a7e78e397612 100644
--- a/net/quic/core/quic_crypto_server_stream_test.cc
+++ b/net/quic/core/quic_crypto_server_stream_test.cc
@@ -24,6 +24,7 @@
#include "net/quic/core/quic_session.h"
#include "net/quic/platform/api/quic_socket_address.h"
#include "net/quic/test_tools/crypto_test_utils.h"
+#include "net/quic/test_tools/failing_proof_source.h"
#include "net/quic/test_tools/quic_crypto_server_config_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -483,30 +484,6 @@ TEST_P(QuicCryptoServerStreamTest, NoTokenBindingWithoutClientSupport) {
EXPECT_TRUE(server_stream()->handshake_confirmed());
}
-class FailingProofSource : public ProofSource {
- public:
- bool GetProof(const QuicSocketAddress& server_address,
- const string& hostname,
- const string& server_config,
- QuicVersion quic_version,
- StringPiece chlo_hash,
- const QuicTagVector& connection_options,
- QuicReferenceCountedPointer<ProofSource::Chain>* out_chain,
- QuicCryptoProof* out_proof) override {
- return false;
- }
-
- void GetProof(const QuicSocketAddress& server_address,
- const string& hostname,
- const string& server_config,
- QuicVersion quic_version,
- StringPiece chlo_hash,
- const QuicTagVector& connection_options,
- std::unique_ptr<Callback> callback) override {
- callback->Run(false, nullptr, QuicCryptoProof(), nullptr);
- }
-};
-
class QuicCryptoServerStreamTestWithFailingProofSource
: public QuicCryptoServerStreamTest {
public:

Powered by Google App Engine
This is Rietveld 408576698