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

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

Issue 18063004: Move timing files into base/time, install forwarding headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios 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/hi_res_timer_manager_posix.cc ('k') | base/timer/hi_res_timer_manager_win.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/hi_res_timer_manager.h" 5 #include "base/timer/hi_res_timer_manager.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/power_monitor/power_monitor.h" 9 #include "base/power_monitor/power_monitor.h"
10 #include "base/time.h" 10 #include "base/time/time.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace base {
14
13 #if defined(OS_WIN) 15 #if defined(OS_WIN)
14 // http://crbug.com/114048 16 // http://crbug.com/114048
15 TEST(HiResTimerManagerTest, DISABLED_ToggleOnOff) { 17 TEST(HiResTimerManagerTest, DISABLED_ToggleOnOff) {
16 base::MessageLoop loop; 18 base::MessageLoop loop;
17 scoped_ptr<base::PowerMonitor> power_monitor(new base::PowerMonitor()); 19 scoped_ptr<base::PowerMonitor> power_monitor(new base::PowerMonitor());
18 HighResolutionTimerManager manager; 20 HighResolutionTimerManager manager;
19 21
20 // At this point, we don't know if the high resolution timers are on or off, 22 // At this point, we don't know if the high resolution timers are on or off,
21 // it depends on what system the tests are running on (for example, if this 23 // it depends on what system the tests are running on (for example, if this
22 // test is running on a laptop/battery, then the PowerMonitor would have 24 // test is running on a laptop/battery, then the PowerMonitor would have
(...skipping 21 matching lines...) Expand all
44 // Simulate a off-battery power event. 46 // Simulate a off-battery power event.
45 manager.OnPowerStateChange(/* on_battery */ false); 47 manager.OnPowerStateChange(/* on_battery */ false);
46 EXPECT_TRUE(manager.hi_res_clock_available()); 48 EXPECT_TRUE(manager.hi_res_clock_available());
47 EXPECT_TRUE(base::Time::IsHighResolutionTimerInUse()); 49 EXPECT_TRUE(base::Time::IsHighResolutionTimerInUse());
48 50
49 // De-activate the high resolution timer. 51 // De-activate the high resolution timer.
50 base::Time::ActivateHighResolutionTimer(false); 52 base::Time::ActivateHighResolutionTimer(false);
51 } 53 }
52 } 54 }
53 #endif // defined(OS_WIN) 55 #endif // defined(OS_WIN)
56
57 } // namespace base
OLDNEW
« no previous file with comments | « base/timer/hi_res_timer_manager_posix.cc ('k') | base/timer/hi_res_timer_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698