1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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/quic/test_tools/mock_clock.h" 8 #include "net/third_party/quiche/src/quic/test_tools/mock_random.h" 9 #include "testing/gtest/include/gtest/gtest.h" 10 11 namespace net { 12 namespace test { 13 namespace { 14 15 class QuicChromiumConnectionHelperTest : public ::testing::Test { 16 protected: QuicChromiumConnectionHelperTest()17 QuicChromiumConnectionHelperTest() : helper_(&clock_, &random_generator_) {} 18 19 QuicChromiumConnectionHelper helper_; 20 quic::MockClock clock_; 21 quic::test::MockRandom random_generator_; 22 }; 23 TEST_F(QuicChromiumConnectionHelperTest,GetClock)24TEST_F(QuicChromiumConnectionHelperTest, GetClock) { 25 EXPECT_EQ(&clock_, helper_.GetClock()); 26 } 27 TEST_F(QuicChromiumConnectionHelperTest,GetRandomGenerator)28TEST_F(QuicChromiumConnectionHelperTest, GetRandomGenerator) { 29 EXPECT_EQ(&random_generator_, helper_.GetRandomGenerator()); 30 } 31 32 } // namespace 33 } // namespace test 34 } // namespace net 35