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

Side by Side Diff: net/base/expiring_cache_unittest.cc

Issue 18054009: Use a direct include of time headers in net/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/expiring_cache.h ('k') | net/base/filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/expiring_cache.h" 5 #include "net/base/expiring_cache.h"
6 6
7 #include <functional> 7 #include <functional>
8 #include <string> 8 #include <string>
9 9
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "base/time.h" 12 #include "base/time/time.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 using testing::Pointee; 16 using testing::Pointee;
17 using testing::StrEq; 17 using testing::StrEq;
18 18
19 namespace net { 19 namespace net {
20 20
21 namespace { 21 namespace {
22 22
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // should be able to add something at kHeatDeath that expires at kMuchLater. 302 // should be able to add something at kHeatDeath that expires at kMuchLater.
303 cache.Put("test7", "foo7", kHeatDeath, kMuchLater); 303 cache.Put("test7", "foo7", kHeatDeath, kMuchLater);
304 EXPECT_EQ(1U, cache.size()); 304 EXPECT_EQ(1U, cache.size());
305 EXPECT_THAT(cache.Get("test7", kNow), Pointee(StrEq("foo7"))); 305 EXPECT_THAT(cache.Get("test7", kNow), Pointee(StrEq("foo7")));
306 EXPECT_THAT(cache.Get("test7", kLater), Pointee(StrEq("foo7"))); 306 EXPECT_THAT(cache.Get("test7", kLater), Pointee(StrEq("foo7")));
307 EXPECT_THAT(cache.Get("test7", kHeatDeath), Pointee(StrEq("foo7"))); 307 EXPECT_THAT(cache.Get("test7", kHeatDeath), Pointee(StrEq("foo7")));
308 EXPECT_FALSE(cache.Get("test7", kMuchLater)); 308 EXPECT_FALSE(cache.Get("test7", kMuchLater));
309 } 309 }
310 310
311 } // namespace net 311 } // namespace net
OLDNEW
« no previous file with comments | « net/base/expiring_cache.h ('k') | net/base/filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698