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

Side by Side Diff: base/idletimer_unittest.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/idle_timer.h" 5 #include "base/idle_timer.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 using base::Time;
10 using base::TimeDelta;
9 using base::IdleTimer; 11 using base::IdleTimer;
10 12
11 namespace { 13 namespace {
12 14
13 // We Mock the GetLastInputInfo function to return 15 // We Mock the GetLastInputInfo function to return
14 // the time stored here. 16 // the time stored here.
15 static Time mock_timer_started; 17 static Time mock_timer_started;
16 18
17 bool MockIdleTimeSource(int32 *milliseconds_interval_since_last_event) { 19 bool MockIdleTimeSource(int32 *milliseconds_interval_since_last_event) {
18 TimeDelta delta = Time::Now() - mock_timer_started; 20 TimeDelta delta = Time::Now() - mock_timer_started;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 224
223 test_task.Start(); 225 test_task.Start();
224 MessageLoop::current()->Run(); 226 MessageLoop::current()->Run();
225 227
226 reset_timer.Stop(); 228 reset_timer.Stop();
227 229
228 EXPECT_EQ(test_task.get_idle_counter(), 0); 230 EXPECT_EQ(test_task.get_idle_counter(), 0);
229 } 231 }
230 232
231 } // namespace 233 } // namespace
OLDNEW
« no previous file with comments | « base/idle_timer.cc ('k') | base/message_loop.h » ('j') | base/time_format.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698