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

Unified Diff: net/tools/quic/quic_epoll_clock_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/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 1ed1d15c1d7eaa6d541239c240b113c6bb90dbbf..0000000000000000000000000000000000000000
--- a/net/tools/quic/quic_epoll_clock_test.cc
+++ /dev/null
@@ -1,57 +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 tools {
-namespace test {
-
-TEST(QuicEpollClockTest, ApproximateNowInUsec) {
- MockEpollServer epoll_server;
- QuicEpollClock clock(&epoll_server);
-
- epoll_server.set_now_in_usec(1000000);
- EXPECT_EQ(1000000,
- clock.ApproximateNow().Subtract(QuicTime::Zero()).ToMicroseconds());
-
- epoll_server.AdvanceBy(5);
- EXPECT_EQ(1000005,
- clock.ApproximateNow().Subtract(QuicTime::Zero()).ToMicroseconds());
-}
-
-TEST(QuicEpollClockTest, NowInUsec) {
- MockEpollServer epoll_server;
- QuicEpollClock clock(&epoll_server);
-
- epoll_server.set_now_in_usec(1000000);
- EXPECT_EQ(1000000,
- clock.Now().Subtract(QuicTime::Zero()).ToMicroseconds());
-
- epoll_server.AdvanceBy(5);
- EXPECT_EQ(1000005,
- clock.Now().Subtract(QuicTime::Zero()).ToMicroseconds());
-}
-
-TEST(QuicEpollClockTest, WallNow) {
- MockEpollServer epoll_server;
- QuicEpollClock clock(&epoll_server);
-
- base::Time start = base::Time::Now();
- QuicWallTime now = clock.WallNow();
- base::Time end = base::Time::Now();
-
- // If end > start, then we can check now is between start and end.
- if (end > start) {
- EXPECT_LE(static_cast<uint64>(start.ToTimeT()), now.ToUNIXSeconds());
- EXPECT_LE(now.ToUNIXSeconds(), static_cast<uint64>(end.ToTimeT()));
- }
-}
-
-} // namespace test
-} // namespace tools
-} // 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