diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-09-01 11:08:40 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-10-01 12:16:21 +0000 |
commit | 03c549e0392f92c02536d3f86d5e1d8dfa3435ac (patch) | |
tree | fe49d170a929b34ba82cd10db1a0bd8e3760fa4b /chromium/net/third_party/quiche/src/quic/core/quic_utils_test.cc | |
parent | 5d013f5804a0d91fcf6c626b2d6fb6eca5c845b0 (diff) | |
download | qtwebengine-chromium-03c549e0392f92c02536d3f86d5e1d8dfa3435ac.tar.gz |
BASELINE: Update Chromium to 91.0.4472.160
Change-Id: I0def1f08a2412aeed79a9ab95dd50eb5c3f65f31
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/third_party/quiche/src/quic/core/quic_utils_test.cc')
-rw-r--r-- | chromium/net/third_party/quiche/src/quic/core/quic_utils_test.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/chromium/net/third_party/quiche/src/quic/core/quic_utils_test.cc b/chromium/net/third_party/quiche/src/quic/core/quic_utils_test.cc index a5249d7cf48..dc1165242f5 100644 --- a/chromium/net/third_party/quiche/src/quic/core/quic_utils_test.cc +++ b/chromium/net/third_party/quiche/src/quic/core/quic_utils_test.cc @@ -7,6 +7,7 @@ #include <string> #include "absl/base/macros.h" +#include "absl/numeric/int128.h" #include "absl/strings/string_view.h" #include "quic/core/crypto/crypto_protocol.h" #include "quic/core/quic_connection_id.h" @@ -79,17 +80,17 @@ TEST_F(QuicUtilsTest, DetermineAddressChangeType) { QuicUtils::DetermineAddressChangeType(old_address, new_address)); } -QuicUint128 IncrementalHashReference(const void* data, size_t len) { +absl::uint128 IncrementalHashReference(const void* data, size_t len) { // The two constants are defined as part of the hash algorithm. // see http://www.isthe.com/chongo/tech/comp/fnv/ // hash = 144066263297769815596495629667062367629 - QuicUint128 hash = MakeQuicUint128(UINT64_C(7809847782465536322), - UINT64_C(7113472399480571277)); + absl::uint128 hash = absl::MakeUint128(UINT64_C(7809847782465536322), + UINT64_C(7113472399480571277)); // kPrime = 309485009821345068724781371 - const QuicUint128 kPrime = MakeQuicUint128(16777216, 315); + const absl::uint128 kPrime = absl::MakeUint128(16777216, 315); const uint8_t* octets = reinterpret_cast<const uint8_t*>(data); for (size_t i = 0; i < len; ++i) { - hash = hash ^ MakeQuicUint128(0, octets[i]); + hash = hash ^ absl::MakeUint128(0, octets[i]); hash = hash * kPrime; } return hash; @@ -311,9 +312,12 @@ TEST_F(QuicUtilsTest, StatelessResetToken) { QuicConnectionId connection_id1a = test::TestConnectionId(1); QuicConnectionId connection_id1b = test::TestConnectionId(1); QuicConnectionId connection_id2 = test::TestConnectionId(2); - QuicUint128 token1a = QuicUtils::GenerateStatelessResetToken(connection_id1a); - QuicUint128 token1b = QuicUtils::GenerateStatelessResetToken(connection_id1b); - QuicUint128 token2 = QuicUtils::GenerateStatelessResetToken(connection_id2); + StatelessResetToken token1a = + QuicUtils::GenerateStatelessResetToken(connection_id1a); + StatelessResetToken token1b = + QuicUtils::GenerateStatelessResetToken(connection_id1b); + StatelessResetToken token2 = + QuicUtils::GenerateStatelessResetToken(connection_id2); EXPECT_EQ(token1a, token1b); EXPECT_NE(token1a, token2); } |