| Index: components/test_runner/web_frame_test_client.cc
|
| diff --git a/components/test_runner/web_frame_test_client.cc b/components/test_runner/web_frame_test_client.cc
|
| index ca0aa871cf8c7080239684ef9614ce313809b63e..9b19b0beeb7251f012df99e4b34350d21985cc56 100644
|
| --- a/components/test_runner/web_frame_test_client.cc
|
| +++ b/components/test_runner/web_frame_test_client.cc
|
| @@ -136,34 +136,6 @@ std::string URLSuitableForTestResult(const std::string& url) {
|
| return filename;
|
| }
|
|
|
| -// WebNavigationType debugging strings taken from PolicyDelegate.mm.
|
| -const char* kLinkClickedString = "link clicked";
|
| -const char* kFormSubmittedString = "form submitted";
|
| -const char* kBackForwardString = "back/forward";
|
| -const char* kReloadString = "reload";
|
| -const char* kFormResubmittedString = "form resubmitted";
|
| -const char* kOtherString = "other";
|
| -const char* kIllegalString = "illegal value";
|
| -
|
| -// Get a debugging string from a WebNavigationType.
|
| -const char* WebNavigationTypeToString(blink::WebNavigationType type) {
|
| - switch (type) {
|
| - case blink::WebNavigationTypeLinkClicked:
|
| - return kLinkClickedString;
|
| - case blink::WebNavigationTypeFormSubmitted:
|
| - return kFormSubmittedString;
|
| - case blink::WebNavigationTypeBackForward:
|
| - return kBackForwardString;
|
| - case blink::WebNavigationTypeReload:
|
| - return kReloadString;
|
| - case blink::WebNavigationTypeFormResubmitted:
|
| - return kFormResubmittedString;
|
| - case blink::WebNavigationTypeOther:
|
| - return kOtherString;
|
| - }
|
| - return kIllegalString;
|
| -}
|
| -
|
| } // namespace
|
|
|
| WebFrameTestClient::WebFrameTestClient(
|
| @@ -391,7 +363,7 @@ void WebFrameTestClient::loadURLExternally(
|
| const blink::WebURLRequest& request,
|
| blink::WebNavigationPolicy policy,
|
| const blink::WebString& suggested_name,
|
| - bool replaces_current_history_item) {
|
| + blink::WebFrameLoadType load_type) {
|
| if (test_runner()->shouldWaitUntilExternalURLLoad()) {
|
| if (policy == blink::WebNavigationPolicyDownload) {
|
| delegate_->PrintMessage(
|
| @@ -412,7 +384,10 @@ void WebFrameTestClient::loadErrorPage(int reason) {
|
| }
|
| }
|
|
|
| -void WebFrameTestClient::didStartProvisionalLoad(blink::WebLocalFrame* frame) {
|
| +void WebFrameTestClient::didStartProvisionalLoad(
|
| + blink::WebDataSource* data_source,
|
| + blink::WebFrameLoadType load_type) {
|
| + blink::WebFrame* frame = web_frame_test_proxy_base_->web_frame();
|
| test_runner()->tryToSetTopLoadingFrame(frame);
|
|
|
| if (test_runner()->shouldDumpFrameLoadCallbacks()) {
|
| @@ -446,11 +421,12 @@ void WebFrameTestClient::didFailProvisionalLoad(
|
| }
|
|
|
| void WebFrameTestClient::didCommitProvisionalLoad(
|
| - blink::WebLocalFrame* frame,
|
| + blink::WebDataSource* data_source,
|
| + blink::WebFrameLoadType load_type,
|
| const blink::WebHistoryItem& history_item,
|
| blink::WebHistoryCommitType history_type) {
|
| if (test_runner()->shouldDumpFrameLoadCallbacks()) {
|
| - PrintFrameDescription(delegate_, frame);
|
| + PrintFrameDescription(delegate_, web_frame_test_proxy_base_->web_frame());
|
| delegate_->PrintMessage(" - didCommitLoadForFrame\n");
|
| }
|
| }
|
| @@ -508,7 +484,8 @@ void WebFrameTestClient::didFinishLoad(blink::WebLocalFrame* frame) {
|
| }
|
|
|
| void WebFrameTestClient::didNavigateWithinPage(
|
| - blink::WebLocalFrame* frame,
|
| + blink::WebDataSource* data_source,
|
| + blink::WebFrameLoadType load_type,
|
| const blink::WebHistoryItem& history_item,
|
| blink::WebHistoryCommitType commit_type,
|
| bool contentInitiated) {
|
| @@ -537,7 +514,8 @@ void WebFrameTestClient::didDispatchPingLoader(const blink::WebURL& url) {
|
| }
|
|
|
| void WebFrameTestClient::willSendRequest(blink::WebLocalFrame* frame,
|
| - blink::WebURLRequest& request) {
|
| + blink::WebURLRequest& request,
|
| + blink::WebFrameLoadType load_type) {
|
| // PlzNavigate
|
| // Navigation requests initiated by the renderer will have been logged when
|
| // the navigation was sent to the browser. Please see
|
| @@ -668,10 +646,8 @@ blink::WebNavigationPolicy WebFrameTestClient::decidePolicyForNavigation(
|
| if (!test_runner()->policyDelegateEnabled())
|
| return info.defaultPolicy;
|
|
|
| - delegate_->PrintMessage(
|
| - std::string("Policy delegate: attempt to load ") +
|
| - URLDescription(info.urlRequest.url()) + " with navigation type '" +
|
| - WebNavigationTypeToString(info.navigationType) + "'\n");
|
| + delegate_->PrintMessage(std::string("Policy delegate: attempt to load ") +
|
| + URLDescription(info.urlRequest.url()) + "\n");
|
| if (test_runner()->policyDelegateIsPermissive())
|
| result = blink::WebNavigationPolicyCurrentTab;
|
| else
|
|
|