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 9bbb0a7149c1d32a8b5a44358e2483730f2bacd4..4284a625be935ceb275490158838a1b5d4dd24c1 100644 |
--- a/third_party/WebKit/Source/platform/TimerTest.cpp |
+++ b/third_party/WebKit/Source/platform/TimerTest.cpp |
@@ -280,13 +280,18 @@ class TimerTest : public testing::Test { |
public: |
void SetUp() override |
{ |
- WTF::setMonotonicallyIncreasingTimeFunction(currentTime); |
+ m_originalTimeFunction = setTimeFunctionsForTesting(currentTime); |
m_runTimes.clear(); |
gCurrentTimeSecs = 10.0; |
m_startTime = gCurrentTimeSecs; |
} |
+ void TearDown() override |
+ { |
+ setTimeFunctionsForTesting(m_originalTimeFunction); |
+ } |
+ |
void countingTask(Timer<TimerTest>*) |
{ |
m_runTimes.append(monotonicallyIncreasingTime()); |
@@ -334,6 +339,7 @@ protected: |
private: |
TimerTestPlatform m_platform; |
+ TimeFunction m_originalTimeFunction; |
}; |
TEST_F(TimerTest, StartOneShot_Zero) |