1 // Copyright 2012 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "net/quic/quic_chromium_connection_helper.h" 6 7 #include "net/third_party/quiche/src/quiche/quic/test_tools/mock_clock.h" 8 #include "net/third_party/quiche/src/quiche/quic/test_tools/mock_random.h" 9 #include "testing/gtest/include/gtest/gtest.h" 10 11 namespace net::test { 12 namespace { 13 14 class QuicChromiumConnectionHelperTest : public ::testing::Test { 15 protected: QuicChromiumConnectionHelperTest()16 QuicChromiumConnectionHelperTest() : helper_(&clock_, &random_generator_) {} 17 18 QuicChromiumConnectionHelper helper_; 19 quic::MockClock clock_; 20 quic::test::MockRandom random_generator_; 21 }; 22 TEST_F(QuicChromiumConnectionHelperTest,GetClock)23TEST_F(QuicChromiumConnectionHelperTest, GetClock) { 24 EXPECT_EQ(&clock_, helper_.GetClock()); 25 } 26 TEST_F(QuicChromiumConnectionHelperTest,GetRandomGenerator)27TEST_F(QuicChromiumConnectionHelperTest, GetRandomGenerator) { 28 EXPECT_EQ(&random_generator_, helper_.GetRandomGenerator()); 29 } 30 31 } // namespace 32 } // namespace net::test 33