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

Side by Side Diff: components/copresence/timed_map_unittest.cc

Issue 1546143002: Switch to standard integer types in components/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « components/copresence/timed_map.h ('k') | components/crash/content/app/breakpad_linux.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/basictypes.h"
6 #include "base/macros.h" 5 #include "base/macros.h"
7 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
8 #include "base/test/simple_test_tick_clock.h" 7 #include "base/test/simple_test_tick_clock.h"
9 #include "components/copresence/timed_map.h" 8 #include "components/copresence/timed_map.h"
10 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
11 10
12 namespace { 11 namespace {
13 12
14 struct Value { 13 struct Value {
15 Value() : value(0) {} 14 Value() : value(0) {}
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 EXPECT_FALSE(map.HasKey(0x1337)); 120 EXPECT_FALSE(map.HasKey(0x1337));
122 EXPECT_EQ(0, map.GetValue(0x1337).value); 121 EXPECT_EQ(0, map.GetValue(0x1337).value);
123 EXPECT_TRUE(map.HasKey(0xbaad)); 122 EXPECT_TRUE(map.HasKey(0xbaad));
124 EXPECT_EQ(0xf00d, map.GetValue(0xbaad).value); 123 EXPECT_EQ(0xf00d, map.GetValue(0xbaad).value);
125 124
126 // Check values at T=2*kLargeTimeValueSeconds 125 // Check values at T=2*kLargeTimeValueSeconds
127 clock->Advance(base::TimeDelta::FromSeconds(kLargeTimeValueSeconds)); 126 clock->Advance(base::TimeDelta::FromSeconds(kLargeTimeValueSeconds));
128 EXPECT_FALSE(map.HasKey(0xbaad)); 127 EXPECT_FALSE(map.HasKey(0xbaad));
129 EXPECT_EQ(0, map.GetValue(0xbaad).value); 128 EXPECT_EQ(0, map.GetValue(0xbaad).value);
130 } 129 }
OLDNEW
« no previous file with comments | « components/copresence/timed_map.h ('k') | components/crash/content/app/breakpad_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698