Commit aca93387 authored by japhet@chromium.org's avatar japhet@chromium.org

Remove willRequestResource callback, it is unused outside of tests.

API in WebFrameClient will be removed after corresponding test harness logic
is removed.

BUG=523091

Review URL: https://codereview.chromium.org/1288323006

git-svn-id: svn://svn.chromium.org/blink/trunk@200943 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a61c1dc4
......@@ -1702,7 +1702,6 @@ crbug.com/521764 [ Win10 ] fast/forms/search/search-appearance-basic.html [ Fail
crbug.com/521764 [ Win10 ] fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar.html [ Crash ImageOnlyFailure Timeout ]
crbug.com/521764 [ Win10 ] fast/html/imports/rel-style-to-import.html [ Pass Timeout ]
crbug.com/521764 [ Win10 ] fast/inline/justify-emphasis-inline-box.html [ ImageOnlyFailure Timeout ]
crbug.com/521764 [ Win10 ] fast/loader/resource-request-callbacks.html [ Failure Pass ]
crbug.com/521764 [ Win10 ] fast/loader/scroll-restore-overrides-fragment.html [ Failure Pass ]
crbug.com/521764 [ Win10 ] fast/loader/scroll-restore-target-pseudo.html [ Failure Pass ]
crbug.com/521764 [ Win10 ] fast/preloader/input.html [ Failure Pass ]
......
......@@ -6,8 +6,6 @@
testRunner.dumpAsText();
addEventListener("DOMContentLoaded", function() {
if (window.testRunner && sessionStorage.pageReloaded)
testRunner.dumpResourceRequestCallbacks();
window.testdiv = document.createElement("div");
window.testdiv.innerHTML = '<img id="foo" src="resources/blue-100-px-square.png" srcset="../../hidpi/resources/image-set-1x.png 200w, ../../hidpi/resources/image-set-2x.png 400w, resources/image-set-4x.png 800w">';
}, false);
......
main frame - img requested 'green-400-px-square.png'
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -11,8 +11,6 @@
}
addEventListener("DOMContentLoaded", function() {
if (window.testRunner && sessionStorage.pageReloaded)
testRunner.dumpResourceRequestCallbacks();
updateSrc();
}, false);
addEventListener("load", function() {
......
main frame - img requested 'green-400-px-square.png'
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -14,7 +14,6 @@
addEventListener("DOMContentLoaded", function() {
if (window.testRunner && sessionStorage.pageReloaded) {
testRunner.dumpResourceRequestCallbacks();
// Have to make sure to only load the src after the reload.
// Otherwise, we'd request and cache the 1x URL while the
// scale factor is 1, and after we reload we find the URL
......
main frame - img requested 'dice.png'
main frame - img requested 'dice.png'
main frame - img requested 'not-existing.png'
main frame - css requested 'Ahem.ttf'
main frame - css requested 'greenbox-hotspot35-4.cur'
main frame - css requested 'lenna.png'
main frame - script requested 'empty-script.js'
main frame - img requested 'mu.png'
main frame - img requested 'oval.png'
main frame - img requested 'png_per_row_alpha.png'
main frame - css requested 'palatted-color-png-gamma-one-color-profile.png'
This test checks that the correct callbacks for resource requests are invoked. It passes if you see the callbacks for 11 resources.
PASS
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script>
window.jsTestIsAsync = true;
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpResourceRequestCallbacks();
} else {
document.write("This test cannot run without a testRunner");
}
function requestMoreResources() {
document.getElementById("img-changing").src = "../images/resources/mu.png";
var createdImage = document.createElement("img");
createdImage.id = "img-created";
createdImage.src = "../images/resources/oval.png";
document.getElementById("images").appendChild(createdImage);
document.getElementById("with-background").style.backgroundImage = "url(../images/resources/palatted-color-png-gamma-one-color-profile.png)";
// Force a style recalc so the background image starts loading.
getComputedStyle(document.getElementById("with-background"));
document.getElementById("more-images").innerHTML = "<img id='img-created-2' src='../images/resources/png_per_row_alpha.png'>";
var createdScript = document.createElement("script");
createdScript.id = "script-created";
createdScript.src = "../loader/resources/empty-script.js";
document.head.appendChild(createdScript);
setTimeout(finishTest, 0);
}
function finishTest() {
testPassed("");
finishJSTest();
}
</script>
<style>
#with-background
{
background-image:url("../images/resources/lenna.png");
}
body
{
cursor:url("../events/resources/greenbox-hotspot35-4.cur"), pointer;
}
@font-face
{
font-family: custom_font;
src: url("../../resources/Ahem.ttf");
}
p
{
font-family: custom_font;
}
</style>
</head>
<body onload="requestMoreResources()">
<div id="with-background">
<p>
This test checks that the correct callbacks for resource requests are
invoked. It passes if you see the callbacks for 11 resources.
</p>
</div>
<div id="images">
<img id="img-normal" src="../images/resources/dice.png" />
<img id="img-changing" src="../images/resources/dice.png" />
<img id="img-fail" />
<img id="img-not-there" src="not-existing.png" />
</div>
<div id="more-images">
</div>
<div id="console"></div>
</body>
</html>
......@@ -94,10 +94,6 @@ void FetchContext::sendRemainingDelegateMessages(unsigned long, const ResourceRe
{
}
void FetchContext::dispatchWillRequestResource(FetchRequest*)
{
}
void FetchContext::willStartLoadingResource(ResourceRequest&)
{
}
......
......@@ -83,7 +83,6 @@ public:
virtual void sendRemainingDelegateMessages(unsigned long identifier, const ResourceResponse&, int dataLength);
virtual bool shouldLoadNewResource(Resource::Type) const { return false; }
virtual void dispatchWillRequestResource(FetchRequest*);
virtual void willStartLoadingResource(ResourceRequest&);
virtual void didLoadResource();
......
......@@ -355,8 +355,6 @@ ResourcePtr<Resource> ResourceFetcher::requestResource(FetchRequest& request, co
if (!context().canRequest(factory.type(), request.resourceRequest(), url, request.options(), request.forPreload(), request.originRestriction()))
return nullptr;
context().dispatchWillRequestResource(&request);
if (!request.forPreload()) {
V8DOMActivityLogger* activityLogger = nullptr;
if (request.options().initiatorInfo.name == FetchInitiatorTypeNames::xmlhttprequest)
......
......@@ -301,11 +301,6 @@ bool FrameFetchContext::shouldLoadNewResource(Resource::Type type) const
return m_documentLoader == frame()->loader().documentLoader();
}
void FrameFetchContext::dispatchWillRequestResource(FetchRequest* request)
{
frame()->loader().client()->dispatchWillRequestResource(request);
}
void FrameFetchContext::willStartLoadingResource(ResourceRequest& request)
{
if (m_documentLoader)
......
......@@ -81,7 +81,6 @@ public:
void sendRemainingDelegateMessages(unsigned long identifier, const ResourceResponse&, int dataLength) override;
bool shouldLoadNewResource(Resource::Type) const override;
void dispatchWillRequestResource(FetchRequest*) override;
void willStartLoadingResource(ResourceRequest&) override;
void didLoadResource() override;
......
......@@ -102,8 +102,6 @@ public:
virtual NavigationPolicy decidePolicyForNavigation(const ResourceRequest&, DocumentLoader*, NavigationPolicy) = 0;
virtual void dispatchWillRequestResource(FetchRequest*) { }
virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) = 0;
virtual void dispatchWillSubmitForm(HTMLFormElement*) = 0;
......
......@@ -77,7 +77,6 @@
#include "public/platform/WebURLError.h"
#include "public/platform/WebVector.h"
#include "public/web/WebAutofillClient.h"
#include "public/web/WebCachedURLRequest.h"
#include "public/web/WebContentSettingsClient.h"
#include "public/web/WebDOMEvent.h"
#include "public/web/WebDocument.h"
......@@ -556,14 +555,6 @@ NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource
return static_cast<NavigationPolicy>(webPolicy);
}
void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request)
{
if (m_webFrame->client()) {
WebCachedURLRequest urlRequest(request);
m_webFrame->client()->willRequestResource(m_webFrame, urlRequest);
}
}
void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form)
{
if (m_webFrame->client())
......
......@@ -99,7 +99,6 @@ public:
void dispatchDidChangeThemeColor() override;
NavigationPolicy decidePolicyForNavigation(const ResourceRequest&, DocumentLoader*, NavigationPolicy) override;
void dispatchWillRequestResource(FetchRequest*) override;
void dispatchWillSendSubmitEvent(HTMLFormElement*) override;
void dispatchWillSubmitForm(HTMLFormElement*) override;
void didStartLoading(LoadStartType) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment