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

Unified Diff: net/quic/quic_server_test.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « net/quic/quic_server_session.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_server_test.cc
diff --git a/net/quic/quic_server_test.cc b/net/quic/quic_server_test.cc
deleted file mode 100644
index 9e4e8944fc7c096b7cfef559d37346a6ffd9f72b..0000000000000000000000000000000000000000
--- a/net/quic/quic_server_test.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/quic/quic_server.h"
-
-#include "net/quic/crypto/quic_random.h"
-#include "net/quic/quic_utils.h"
-#include "net/quic/test_tools/mock_quic_dispatcher.h"
-#include "net/quic/test_tools/quic_test_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using ::testing::_;
-
-namespace net {
-namespace test {
-
-namespace {
-
-// TODO(dmz) Remove "Chrome" part of name once net/tools/quic is deleted.
-class QuicChromeServerDispatchPacketTest : public ::testing::Test {
- public:
- QuicChromeServerDispatchPacketTest()
- : crypto_config_("blah", QuicRandom::GetInstance()),
- dispatcher_(config_,
- crypto_config_,
- new QuicDispatcher::DefaultPacketWriterFactory(),
- &helper_) {
- dispatcher_.Initialize(nullptr);
- }
-
- void DispatchPacket(const QuicEncryptedPacket& packet) {
- IPEndPoint client_addr, server_addr;
- dispatcher_.ProcessPacket(server_addr, client_addr, packet);
- }
-
- protected:
- QuicConfig config_;
- QuicCryptoServerConfig crypto_config_;
- MockHelper helper_;
- MockQuicDispatcher dispatcher_;
-};
-
-TEST_F(QuicChromeServerDispatchPacketTest, DispatchPacket) {
- unsigned char valid_packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xBC, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags
- 0x00 };
- QuicEncryptedPacket encrypted_valid_packet(QuicUtils::AsChars(valid_packet),
- arraysize(valid_packet), false);
-
- EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
- DispatchPacket(encrypted_valid_packet);
-}
-
-} // namespace
-} // namespace test
-} // namespace net
« no previous file with comments | « net/quic/quic_server_session.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698