Commit 9aeb4697 authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Remove |TestRunner::will_navigate_| - no longer needed by PlzNavigate.

This CL reverts r412572 - |TestRunner::will_navigate_| is no longer
needed, because right now PlzNavigate creates a dummy provisional
DocumentLoader at the start of a renderer-initiated navigation - the
presence of a provisional DocumentLoader is taken into account when
computing when to stop the layout TestRunner.

Bug: 765752
Change-Id: Ia50aabbba25937777c6c966ec8e056d4014bd971
Reviewed-on: https://chromium-review.googlesource.com/669602Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502855}
parent 87fa4e45
......@@ -1623,7 +1623,6 @@ TestRunner::TestRunner(TestInterfaces* interfaces)
main_view_(nullptr),
mock_content_settings_client_(
new MockContentSettingsClient(&layout_test_runtime_flags_)),
will_navigate_(false),
credential_manager_client_(new MockCredentialManagerClient),
mock_screen_orientation_client_(new MockScreenOrientationClient),
spellcheck_(new SpellCheckClient(this)),
......@@ -1659,7 +1658,6 @@ void TestRunner::SetMainView(WebView* web_view) {
void TestRunner::Reset() {
is_web_platform_tests_mode_ = false;
will_navigate_ = false;
top_loading_frame_ = nullptr;
layout_test_runtime_flags_.Reset();
mock_screen_orientation_client_->ResetData();
......@@ -1924,13 +1922,7 @@ bool TestRunner::IsFramePartOfMainTestWindow(blink::WebFrame* frame) const {
return test_is_running_ && frame->Top()->View() == main_view_;
}
void TestRunner::OnNavigationBegin(WebFrame* frame) {
if (IsFramePartOfMainTestWindow(frame))
will_navigate_ = true;
}
bool TestRunner::tryToSetTopLoadingFrame(WebFrame* frame) {
will_navigate_ = false;
if (!IsFramePartOfMainTestWindow(frame))
return false;
......@@ -1944,7 +1936,6 @@ bool TestRunner::tryToSetTopLoadingFrame(WebFrame* frame) {
}
bool TestRunner::tryToClearTopLoadingFrame(WebFrame* frame) {
will_navigate_ = false;
if (!IsFramePartOfMainTestWindow(frame))
return false;
......@@ -2854,7 +2845,7 @@ void TestRunner::CheckResponseMimeType() {
void TestRunner::NotifyDone() {
if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() &&
!will_navigate_ && work_queue_.is_empty())
work_queue_.is_empty())
delegate_->TestFinished();
layout_test_runtime_flags_.set_wait_until_done(false);
OnLayoutTestRuntimeFlagsChanged();
......
......@@ -103,8 +103,6 @@ class TestRunner : public WebTestRunner {
void SetFocus(blink::WebView* web_view, bool focus) override;
// Methods used by WebViewTestClient and WebFrameTestClient.
void OnNavigationBegin(blink::WebFrame* frame);
void OnNavigationEnd() { will_navigate_ = false; }
std::string GetAcceptLanguages() const;
bool shouldStayOnPageAfterHandlingBeforeUnload() const;
MockScreenOrientationClient* getMockScreenOrientationClient();
......@@ -626,12 +624,6 @@ class TestRunner : public WebTestRunner {
bool use_mock_theme_;
// This is true in the period between the start of a navigation and when the
// provisional load for that navigation is started. Note that when
// browser-side navigation is enabled there is an arbitrary gap between these
// two events.
bool will_navigate_;
std::unique_ptr<MockCredentialManagerClient> credential_manager_client_;
std::unique_ptr<MockScreenOrientationClient> mock_screen_orientation_client_;
std::unique_ptr<MockWebSpeechRecognizer> speech_recognizer_;
......
......@@ -503,17 +503,6 @@ void WebFrameTestClient::DidFinishLoad() {
}
}
void WebFrameTestClient::DidNavigateWithinPage(
const blink::WebHistoryItem& history_item,
blink::WebHistoryCommitType commit_type,
bool contentInitiated) {
test_runner()->OnNavigationEnd();
}
void WebFrameTestClient::DidStartLoading(bool to_different_document) {
test_runner()->OnNavigationBegin(web_frame_test_proxy_base_->web_frame());
}
void WebFrameTestClient::DidStopLoading() {
test_runner()->tryToClearTopLoadingFrame(
web_frame_test_proxy_base_->web_frame());
......
......@@ -74,10 +74,6 @@ class WebFrameTestClient : public blink::WebFrameClient {
void DidFailLoad(const blink::WebURLError& error,
blink::WebHistoryCommitType commit_type) override;
void DidFinishLoad() override;
void DidNavigateWithinPage(const blink::WebHistoryItem& history_item,
blink::WebHistoryCommitType commit_type,
bool contentInitiated) override;
void DidStartLoading(bool to_different_document) override;
void DidStopLoading() override;
void DidDetectXSS(const blink::WebURL& insecure_url,
bool did_block_entire_page) override;
......
......@@ -155,14 +155,6 @@ class WebFrameTestProxy : public Base, public WebFrameTestProxyBase {
test_client()->DidFinishLoad();
}
void DidNavigateWithinPage(const blink::WebHistoryItem& history_item,
blink::WebHistoryCommitType commit_type,
bool content_initiated) override {
Base::DidNavigateWithinPage(history_item, commit_type, content_initiated);
test_client()->DidNavigateWithinPage(history_item, commit_type,
content_initiated);
}
void DidStopLoading() override {
Base::DidStopLoading();
test_client()->DidStopLoading();
......@@ -249,11 +241,6 @@ class WebFrameTestProxy : public Base, public WebFrameTestProxyBase {
return Base::DecidePolicyForNavigation(info);
}
void DidStartLoading(bool to_different_document) override {
Base::DidStartLoading(to_different_document);
test_client()->DidStartLoading(to_different_document);
}
void WillStartUsingPeerConnectionHandler(
blink::WebRTCPeerConnectionHandler* handler) override {
// RenderFrameImpl::willStartUsingPeerConnectionHandler can not be mocked.
......
......@@ -4,34 +4,6 @@
# https://crbug.com/765779: unique name trouble with PlzNavigate
crbug.com/765779 http/tests/loading/bad-server-subframe.html [ Failure ]
# https://crbug.com/765752: testRunner.notifyDone() ignored with PlzNavigate.
crbug.com/765752 http/tests/cookies/set-cookie-on-redirect.html [ Timeout ]
crbug.com/765752 http/tests/misc/selectionAsMarkup.html [ Timeout ]
crbug.com/765752 http/tests/security/cookies/third-party-cookie-blocking-main-frame.html [ Timeout ]
crbug.com/765752 http/tests/security/cookies/third-party-cookie-blocking-user-action.html [ Timeout ]
crbug.com/765752 http/tests/security/cookies/third-party-cookie-blocking.html [ Timeout ]
crbug.com/765752 http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-two-flags.html [ Timeout ]
crbug.com/765752 http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-on-client-redirect.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-conflicting-policies.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-https-always.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-https-default.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-https-never.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-https-no-referrer-when-downgrade.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-https-no-referrer.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-https-origin-when-crossorigin.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-https-origin.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-https-unsafe-url.html [ Timeout ]
crbug.com/765752 http/tests/security/referrer-policy-origin-when-crossorigin-is-crossorigin.html [ Timeout ]
crbug.com/765752 http/tests/security/xssAuditor/get-from-iframe.html [ Timeout ]
crbug.com/765752 http/tests/security/xssAuditor/post-from-iframe.html [ Timeout ]
crbug.com/765752 http/tests/security/xssAuditor/script-tag-post-control-char.html [ Timeout ]
crbug.com/765752 http/tests/security/xssAuditor/script-tag-post-null-char.html [ Timeout ]
crbug.com/765752 http/tests/security/xssAuditor/script-tag-post-redirect.html [ Timeout ]
crbug.com/765752 http/tests/security/xssAuditor/script-tag-post.html [ Timeout ]
crbug.com/765752 http/tests/security/xssAuditor/xss-filter-bypass-long-string.html [ Timeout ]
# https://crbug.com/758075: Uninvestigated timeout.
# (apparently https://crbug.com/599670 doesn't affect the Site Isolation bot,
# so there is no need to carry-over the [ Failure ] expectation from baseline
......
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