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

Unified Diff: third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.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
Index: third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.cpp b/third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.cpp
index fb03c6c675bb7a0a714159f5bbb2374c9fc32274..2d70846f9175e68e9a7cf20609727770cf4644da 100644
--- a/third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.cpp
@@ -142,7 +142,8 @@ private:
m_fetcher = ResourceFetcher::create(MockFetchContext::create());
s_timeElapsed = 0.0;
- m_originalTimeFunction = setTimeFunctionsForTesting(returnMockTime);
+ m_originalMonotonicTimeFunction = setMonotonicallyIncreasingTimeFunctionForTesting(returnMockTime);
+ m_originalCurrentTimeFunction = setCurrentTimeFunctionForTesting(returnMockTime);
}
virtual void TearDown()
@@ -152,12 +153,14 @@ private:
// Yield the ownership of the global memory cache back.
replaceMemoryCacheForTesting(m_globalMemoryCache.release());
- setTimeFunctionsForTesting(m_originalTimeFunction);
+ setMonotonicallyIncreasingTimeFunctionForTesting(m_originalMonotonicTimeFunction);
+ setCurrentTimeFunctionForTesting(m_originalCurrentTimeFunction);
}
Persistent<MemoryCache> m_globalMemoryCache;
Persistent<ResourceFetcher> m_fetcher;
- TimeFunction m_originalTimeFunction;
+ TimeFunction m_originalMonotonicTimeFunction;
+ TimeFunction m_originalCurrentTimeFunction;
static double s_timeElapsed;
};

Powered by Google App Engine
This is Rietveld 408576698