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

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

Issue 976263002: HTML Imports: Teach preloader about HTML Imports. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test Created 5 years, 6 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/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 90c01536ea43ac549d9a6eb9f6f4f27127e9db28..665ad7417533eb00d7f501d34e04589edc653e0f 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -320,7 +320,13 @@ unsigned Internals::hitTestCount(Document* doc, ExceptionState& exceptionState)
bool Internals::isPreloaded(const String& url)
{
- Document* document = contextDocument();
+ return isPreloadedBy(url, contextDocument());
+}
+
+bool Internals::isPreloadedBy(const String& url, Document* document)
+{
+ if (!document)
+ return false;
return document->fetcher()->isPreloaded(document->completeURL(url));
}

Powered by Google App Engine
This is Rietveld 408576698