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

Unified Diff: net/quic/quic_server_test.cc

Issue 340433002: Port QuicServer to Chrome network stack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address further comments Created 6 years, 6 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/quic_server_test.cc
diff --git a/net/tools/quic/quic_server_test.cc b/net/quic/quic_server_test.cc
similarity index 75%
copy from net/tools/quic/quic_server_test.cc
copy to net/quic/quic_server_test.cc
index e2d7c4f3288f363689eb9a47a72b32ec3cd38b5f..af26bc4c3c8d21f28fb50bec5c4676235293cdd7 100644
--- a/net/tools/quic/quic_server_test.cc
+++ b/net/quic/quic_server_test.cc
@@ -2,27 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/quic/quic_server.h"
+#include "net/quic/quic_server.h"
#include "net/quic/crypto/quic_random.h"
#include "net/quic/quic_utils.h"
-#include "net/tools/quic/test_tools/mock_quic_dispatcher.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 tools {
namespace test {
namespace {
-class QuicServerDispatchPacketTest : public ::testing::Test {
+class QuicChromeServerDispatchPacketTest : public ::testing::Test {
wtc 2014/06/20 21:40:50 Why do we need to rename this test class? If it is
dmziegler 2014/06/23 18:31:25 Added the TODO.
public:
- QuicServerDispatchPacketTest()
+ QuicChromeServerDispatchPacketTest()
: crypto_config_("blah", QuicRandom::GetInstance()),
- dispatcher_(config_, crypto_config_, &eps_) {
- dispatcher_.Initialize(1234);
+ dispatcher_(config_, crypto_config_, &helper_) {
+ dispatcher_.Initialize(NULL);
}
void DispatchPacket(const QuicEncryptedPacket& packet) {
@@ -33,11 +33,11 @@ class QuicServerDispatchPacketTest : public ::testing::Test {
protected:
QuicConfig config_;
QuicCryptoServerConfig crypto_config_;
- EpollServer eps_;
+ MockHelper helper_;
MockQuicDispatcher dispatcher_;
};
-TEST_F(QuicServerDispatchPacketTest, DispatchPacket) {
+TEST_F(QuicChromeServerDispatchPacketTest, DispatchPacket) {
unsigned char valid_packet[] = {
// public flags (8 byte connection_id)
0x3C,
@@ -58,5 +58,4 @@ TEST_F(QuicServerDispatchPacketTest, DispatchPacket) {
} // namespace
} // namespace test
-} // namespace tools
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698