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

Unified Diff: net/tools/quic/quic_epoll_clock_test.cc

Issue 2551603002: Move QuicClock to quic/platform/ (Closed)
Patch Set: missing Created 4 years 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/tools/quic/quic_epoll_clock.cc ('k') | net/tools/quic/quic_epoll_connection_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_epoll_clock_test.cc
diff --git a/net/tools/quic/quic_epoll_clock_test.cc b/net/tools/quic/quic_epoll_clock_test.cc
deleted file mode 100644
index 03d26b821061bcb5973a5fe21437139a1c4c7486..0000000000000000000000000000000000000000
--- a/net/tools/quic/quic_epoll_clock_test.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2012 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/tools/quic/quic_epoll_clock.h"
-
-#include "net/tools/quic/test_tools/mock_epoll_server.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-namespace net {
-namespace test {
-
-TEST(QuicEpollClockTest, ApproximateNowInUsec) {
- MockEpollServer epoll_server;
- QuicEpollClock clock(&epoll_server);
-
- epoll_server.set_now_in_usec(1000000);
- EXPECT_EQ(1000000,
- (clock.ApproximateNow() - QuicTime::Zero()).ToMicroseconds());
- EXPECT_EQ(1u, clock.WallNow().ToUNIXSeconds());
- EXPECT_EQ(1000000u, clock.WallNow().ToUNIXMicroseconds());
-
- epoll_server.AdvanceBy(5);
- EXPECT_EQ(1000005,
- (clock.ApproximateNow() - QuicTime::Zero()).ToMicroseconds());
- EXPECT_EQ(1u, clock.WallNow().ToUNIXSeconds());
- EXPECT_EQ(1000005u, clock.WallNow().ToUNIXMicroseconds());
-
- epoll_server.AdvanceBy(10 * 1000000);
- EXPECT_EQ(11u, clock.WallNow().ToUNIXSeconds());
- EXPECT_EQ(11000005u, clock.WallNow().ToUNIXMicroseconds());
-}
-
-TEST(QuicEpollClockTest, NowInUsec) {
- MockEpollServer epoll_server;
- QuicEpollClock clock(&epoll_server);
-
- epoll_server.set_now_in_usec(1000000);
- EXPECT_EQ(1000000, (clock.Now() - QuicTime::Zero()).ToMicroseconds());
-
- epoll_server.AdvanceBy(5);
- EXPECT_EQ(1000005, (clock.Now() - QuicTime::Zero()).ToMicroseconds());
-}
-
-} // namespace test
-} // namespace net
« no previous file with comments | « net/tools/quic/quic_epoll_clock.cc ('k') | net/tools/quic/quic_epoll_connection_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698