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

Unified Diff: Source/core/fetch/CachingCorrectnessTest.cpp

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 8 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: Source/core/fetch/CachingCorrectnessTest.cpp
diff --git a/Source/core/fetch/CachingCorrectnessTest.cpp b/Source/core/fetch/CachingCorrectnessTest.cpp
index b729004a7782da1ba3c50864f2a29f05119eb7d0..474f94f7d0947fe6d371664331a92e336d7ea618 100644
--- a/Source/core/fetch/CachingCorrectnessTest.cpp
+++ b/Source/core/fetch/CachingCorrectnessTest.cpp
@@ -124,7 +124,7 @@ private:
// A simple platform that mocks out the clock, for cache freshness testing.
class ProxyPlatform : public blink::Platform {
public:
- ProxyPlatform() : m_elapsedSeconds(0.) { }
+ explicit ProxyPlatform() : m_oldPlatform(blink::Platform::current()), m_elapsedSeconds(0.) { }
void advanceClock(double seconds)
{
@@ -145,6 +145,12 @@ private:
return &kAConstUnsignedCharZero;
}
+ WebThread* currentThread() override
+ {
+ return m_oldPlatform->currentThread();
+ }
+
+ blink::Platform* m_oldPlatform; // NOT OWNED
double m_elapsedSeconds;
};

Powered by Google App Engine
This is Rietveld 408576698