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

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

Issue 2389753002: doc.write blocking intervention warning header (Closed)
Patch Set: Feedback incorporated 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 840546dac12637633adb9895e7f155badceeb735..15ac31f992139311810f649b9187a79b1782e102 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -432,6 +432,18 @@ int Internals::getResourcePriority(const String& url, Document* document) {
return resource->resourceRequest().priority();
}
+String Internals::getResourceHeader(const String& url,
+ const String& header,
+ Document* document) {
+ if (!document)
+ return String();
+ Resource* resource = document->fetcher()->allResources().get(
+ URLTestHelpers::toKURL(url.utf8().data()));
+ if (!resource)
+ return String();
+ return resource->resourceRequest().httpHeaderField(header.utf8().data());
+}
+
bool Internals::isSharingStyle(Element* element1, Element* element2) const {
ASSERT(element1 && element2);
return element1->computedStyle() == element2->computedStyle();
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698