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

Unified Diff: third_party/WebKit/Source/platform/TimerTest.cpp

Issue 2155143002: Fix a bug that could occasionaly cause setInterval to stop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/TimerTest.cpp
diff --git a/third_party/WebKit/Source/platform/TimerTest.cpp b/third_party/WebKit/Source/platform/TimerTest.cpp
index dec685062c1e1cf09f5bd020d3bebf5b2e802fb2..8831fc0db14d346aa80f034db9939d9fc182fe07 100644
--- a/third_party/WebKit/Source/platform/TimerTest.cpp
+++ b/third_party/WebKit/Source/platform/TimerTest.cpp
@@ -183,7 +183,6 @@ public:
double nextTimerTaskDelaySecs() const
{
- ASSERT(hasOneTimerTask());
return m_timerTasks.top().delaySeconds();
}
@@ -482,13 +481,12 @@ TEST_F(TimerTest, StartOneShot_NonZero_RepostingAfterRunning)
EXPECT_THAT(m_runTimes, ElementsAre(m_startTime + 10.0, m_startTime + 30.0));
}
-TEST_F(TimerTest, PostingTimerTwiceWithSameRunTimeDoesNothing)
+TEST_F(TimerTest, PostingTimerTwiceWithSameRunTimeOnlyExecutesOnce)
{
Timer<TimerTest> timer(this, &TimerTest::countingTask);
timer.startOneShot(10, BLINK_FROM_HERE);
timer.startOneShot(10, BLINK_FROM_HERE);
- ASSERT(hasOneTimerTask());
EXPECT_FLOAT_EQ(10.0, nextTimerTaskDelaySecs());
runUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698