- EXPECT_TRUE(loop.IsHighResolutionTimerEnabledForTesting());
-
- // Post a slow task and verify high resolution timers
- // are still enabled.
- loop.PostDelayedTask(FROM_HERE, Bind(&PostNTasksThenQuit, 1),
- kSlowTimer);
- loop.Run();
- EXPECT_TRUE(loop.IsHighResolutionTimerEnabledForTesting());
-
- // Wait for a while so that high-resolution mode elapses.
- PlatformThread::Sleep(TimeDelta::FromMilliseconds(
- MessageLoop::kHighResolutionTimerModeLeaseTimeMs));
-
- // Post a slow task to disable the high resolution timers.
+ EXPECT_FALSE(loop.HasHighResolutionTasks());
+ EXPECT_FALSE(Time::IsHighResolutionTimerInUse());
+ // Check that a slow task does not trigger the high resolution logic.