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

Unified Diff: third_party/WebKit/Source/web/tests/TextFinderTest.cpp

Issue 1936853002: Assert event timestamp to be monotonic and not from future Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to histogram Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/web/WebTestingSupport.cpp ('k') | third_party/WebKit/Source/wtf/CurrentTime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/TextFinderTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/TextFinderTest.cpp b/third_party/WebKit/Source/web/tests/TextFinderTest.cpp
index ba6d9c5fea01554f81e7ae249cf25dfcd5218182..3d6c621a2759a0aef97a09215efef1ee2c08deb3 100644
--- a/third_party/WebKit/Source/web/tests/TextFinderTest.cpp
+++ b/third_party/WebKit/Source/web/tests/TextFinderTest.cpp
@@ -464,12 +464,14 @@ protected:
void SetUp() override
{
s_timeElapsed = 0.0;
- m_originalTimeFunction = setTimeFunctionsForTesting(returnMockTime);
+ m_originalMonotonicTimeFunction = setMonotonicallyIncreasingTimeFunctionForTesting(returnMockTime);
+ m_originalCurrentTimeFunction = setCurrentTimeFunctionForTesting(returnMockTime);
}
void TearDown() override
{
- setTimeFunctionsForTesting(m_originalTimeFunction);
+ setMonotonicallyIncreasingTimeFunctionForTesting(m_originalMonotonicTimeFunction);
+ setCurrentTimeFunctionForTesting(m_originalCurrentTimeFunction);
}
private:
@@ -479,7 +481,8 @@ private:
return s_timeElapsed;
}
- TimeFunction m_originalTimeFunction;
+ TimeFunction m_originalMonotonicTimeFunction;
+ TimeFunction m_originalCurrentTimeFunction;
static double s_timeElapsed;
};
« no previous file with comments | « third_party/WebKit/Source/web/WebTestingSupport.cpp ('k') | third_party/WebKit/Source/wtf/CurrentTime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698