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

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

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too 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 | « base/timer/timer.h ('k') | base/tools_sanity_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 <stddef.h>
6
7 #include "base/macros.h"
5 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
7 #include "base/test/test_simple_task_runner.h" 10 #include "base/test/test_simple_task_runner.h"
8 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
12 #include "build/build_config.h"
9 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
10 14
11 using base::TimeDelta; 15 using base::TimeDelta;
12 using base::SingleThreadTaskRunner; 16 using base::SingleThreadTaskRunner;
13 17
14 namespace { 18 namespace {
15 19
16 // The message loops on which each timer should be tested. 20 // The message loops on which each timer should be tested.
17 const base::MessageLoop::Type testing_message_loops[] = { 21 const base::MessageLoop::Type testing_message_loops[] = {
18 base::MessageLoop::TYPE_DEFAULT, 22 base::MessageLoop::TYPE_DEFAULT,
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 base::Bind(&SetCallbackHappened1)); 526 base::Bind(&SetCallbackHappened1));
523 timer.Reset(); 527 timer.Reset();
524 // Since Reset happened before task ran, the user_task must not be cleared: 528 // Since Reset happened before task ran, the user_task must not be cleared:
525 ASSERT_FALSE(timer.user_task().is_null()); 529 ASSERT_FALSE(timer.user_task().is_null());
526 base::MessageLoop::current()->Run(); 530 base::MessageLoop::current()->Run();
527 EXPECT_TRUE(g_callback_happened1); 531 EXPECT_TRUE(g_callback_happened1);
528 } 532 }
529 } 533 }
530 534
531 } // namespace 535 } // namespace
OLDNEW
« no previous file with comments | « base/timer/timer.h ('k') | base/tools_sanity_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698