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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2332333003: Make internals.isPreloaded() to remain the same before/after clearPreloads() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const auto& Created 4 years, 3 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/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index d1c86963cca7d3e5375da5107164133beaa3df5e..9b30ec480db420f2f882f9ce5765343baac5277b 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -250,6 +250,7 @@ Internals::Internals(ScriptState* scriptState)
: ContextLifecycleObserver(scriptState->getExecutionContext())
, m_runtimeFlags(InternalRuntimeFlags::create())
{
+ contextDocument()->fetcher()->enableIsPreloadedForTest();
}
Document* Internals::contextDocument() const
@@ -396,7 +397,7 @@ bool Internals::isPreloadedBy(const String& url, Document* document)
{
if (!document)
return false;
- return document->fetcher()->isPreloaded(document->completeURL(url));
+ return document->fetcher()->isPreloadedForTest(document->completeURL(url));
}
bool Internals::isLoadingFromMemoryCache(const String& url)
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698