Commit 0302144e authored by lukasza's avatar lukasza Committed by Commit bot

Do not navigate "other" windows to about:blank in OnReset.

In crrev.com/14046012 we started to iterate over all RenderViews and
navigating them to about:blank to trigger their unload event handlers
while the main window is still present.  This code is broken when OOPIFs
are enabled (i.e. we cannot navigate a *remote* RenderView / RenderFrame).

This CL basically reverts crrev.com/14046012 and instead puts the burden
on test authors, to make sure that their unload handlers can robustly
handle being executed when the main window is gone.  This makes the
test harness work better in presence of OOPIFs.

BUG=583089

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

Cr-Commit-Position: refs/heads/master@{#374739}
parent 066567c2
......@@ -170,26 +170,6 @@ class ProxyToRenderViewVisitor : public RenderViewVisitor {
DISALLOW_COPY_AND_ASSIGN(ProxyToRenderViewVisitor);
};
class NavigateAwayVisitor : public RenderViewVisitor {
public:
explicit NavigateAwayVisitor(RenderView* main_render_view)
: main_render_view_(main_render_view) {}
~NavigateAwayVisitor() override {}
bool Visit(RenderView* render_view) override {
if (render_view == main_render_view_)
return true;
render_view->GetWebView()->mainFrame()->loadRequest(
WebURLRequest(GURL(url::kAboutBlankURL)));
return true;
}
private:
RenderView* main_render_view_;
DISALLOW_COPY_AND_ASSIGN(NavigateAwayVisitor);
};
class UseSynchronousResizeModeVisitor : public RenderViewVisitor {
public:
explicit UseSynchronousResizeModeVisitor(bool enable) : enable_(enable) {}
......@@ -646,8 +626,6 @@ void BlinkTestRunner::TestFinished() {
}
void BlinkTestRunner::CloseRemainingWindows() {
NavigateAwayVisitor visitor(render_view());
RenderView::ForEach(&visitor);
Send(new ShellViewHostMsg_CloseRemainingWindows(routing_id()));
}
......
......@@ -79,7 +79,7 @@ http/tests/security/xssAuditor/full-block-post-from-iframe.html [ Failure ]
http/tests/security/xssAuditor/xss-protection-parsing-01.html [ Failure ]
# https://crbug.com/582541 - MixedContentChecker::shouldBlockFetch returns false with --site-per-process
http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html [ Failure Crash ]
http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html [ Failure ]
# https://crbug.com/582522 - extra mixedContent checks reported with --site-per-process
http/tests/security/mixedContent/insecure-iframe-in-iframe.html [ Failure ]
......@@ -105,10 +105,10 @@ http/tests/inspector/console-cd.html [ Failure ]
http/tests/webfont/popup-menu-load-webfont-after-open.html [ Failure ]
# https://crbug.com/582525 - testRunner.setAllowDisplayOfInsecureContent is not replicated to OOPIFs.
http/tests/security/mixedContent/insecure-iframe-in-main-frame-allowed.html [ Failure Crash ]
http/tests/security/mixedContent/insecure-iframe-in-main-frame-allowed.html [ Failure ]
http/tests/security/mixedContent/insecure-iframe-in-main-frame.html [ Failure Crash ]
http/tests/security/mixedContent/insecure-image-in-main-frame-allowed.html [ Failure Crash ]
http/tests/security/mixedContent/insecure-script-in-main-frame-allowed.html [ Failure Crash ]
http/tests/security/mixedContent/insecure-image-in-main-frame-allowed.html [ Failure ]
http/tests/security/mixedContent/insecure-script-in-main-frame-allowed.html [ Failure ]
# https://crbug.com/585171 - iframe restored from history should be excluded from performance entries.
http/tests/misc/resource-timing-iframe-restored-from-history.html [ Failure Timeout ]
......@@ -129,40 +129,7 @@ http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html [ Failure ]
http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-star-allow.html [ Timeout ]
http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-url-allow.html [ Timeout ]
http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-star-allow-crossorigin.html [ Timeout ]
http/tests/security/cross-origin-access-over-property-descriptor.html [ Crash ]
http/tests/security/frameNavigation/cross-origin-opener.html [ Crash ]
http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/data-url-iframe-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/insecure-css-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/insecure-css-resources.html [ Crash ]
http/tests/security/mixedContent/insecure-empty-srcset-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/insecure-eventsource-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/insecure-font-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/insecure-formSubmission-in-invisible-DOM.html [ Crash ]
http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-allowed.html [ Crash ]
http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/insecure-formSubmission-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-javascript-allowed.html [ Crash ]
http/tests/security/mixedContent/insecure-frame-in-data-iframe-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/insecure-iframe-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/insecure-image-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/insecure-image-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/insecure-script-in-data-iframe-in-main-frame-blocked.html [ Crash Missing ]
http/tests/security/mixedContent/insecure-script-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/insecure-script-through-redirection.html [ Crash ]
http/tests/security/mixedContent/insecure-srcset-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/insecure-sync-post-xhr-allowed.html [ Crash ]
http/tests/security/mixedContent/insecure-sync-post-xhr-blocked.html [ Crash ]
http/tests/security/mixedContent/insecure-texttrack-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/preload-insecure-image-in-main-frame-blocked.html [ Crash ]
http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame.html [ Crash ]
http/tests/security/mixedContent/websocket/insecure-websocket-in-sandbox-in-secure-page.html [ Crash ]
http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-allowed.html [ Crash ]
http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page.html [ Crash ]
http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-worker-allowed.html [ Crash ]
http/tests/security/mixedContent/websocket/insecure-websocket-in-secure-page-worker.html [ Crash ]
http/tests/security/sandbox-inherit-to-blank-document-unsandboxed-navigate.html [ Crash ]
http/tests/security/mixedContent/insecure-eventsource-in-main-frame.html [ Failure ]
# Uninvestigated failures under http/tests/security:
http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked.html [ Failure ]
......
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