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

Side by Side Diff: base/timer/timer_unittest.cc

Issue 18119002: Use a direct include of time headers in base/, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix 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 | « base/timer/timer.cc ('k') | base/tracked_objects_unittest.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) 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/timer.h" 7 #include "base/timer/timer.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 using base::TimeDelta; 10 using base::TimeDelta;
11 11
12 namespace { 12 namespace {
13 13
14 // The message loops on which each timer should be tested. 14 // The message loops on which each timer should be tested.
15 const base::MessageLoop::Type testing_message_loops[] = { 15 const base::MessageLoop::Type testing_message_loops[] = {
16 base::MessageLoop::TYPE_DEFAULT, 16 base::MessageLoop::TYPE_DEFAULT,
17 base::MessageLoop::TYPE_IO, 17 base::MessageLoop::TYPE_IO,
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 base::Bind(&SetCallbackHappened1)); 480 base::Bind(&SetCallbackHappened1));
481 timer.Reset(); 481 timer.Reset();
482 // Since Reset happened before task ran, the user_task must not be cleared: 482 // Since Reset happened before task ran, the user_task must not be cleared:
483 ASSERT_FALSE(timer.user_task().is_null()); 483 ASSERT_FALSE(timer.user_task().is_null());
484 base::MessageLoop::current()->Run(); 484 base::MessageLoop::current()->Run();
485 EXPECT_TRUE(g_callback_happened1); 485 EXPECT_TRUE(g_callback_happened1);
486 } 486 }
487 } 487 }
488 488
489 } // namespace 489 } // namespace
OLDNEW
« no previous file with comments | « base/timer/timer.cc ('k') | base/tracked_objects_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698