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

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

Issue 1550563002: Blink Platform: Remove time functions from Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 68096b0740f9122f31ee4feb431b83a7db3490de..41d3777b70e0ed0e39bf525e2f2088774424ec72 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)

Powered by Google App Engine
This is Rietveld 408576698