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

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: Merrrge agaaain. Created 4 years, 10 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 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)
« no previous file with comments | « third_party/WebKit/Source/platform/Timer.h ('k') | third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698