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

Unified Diff: components/test_runner/test_runner.cc

Issue 1890493002: PlzNavigate: properly execute BeforeUnload on renderer initiated navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dcheng's comments Created 4 years, 8 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
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 429bf34a2cfd122d66c0e568c6c060effdad5bfa..a90caf5e6614805ba293bdeef3316b19435de11b 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -2236,7 +2236,12 @@ bool TestRunnerForSpecificView::IsCommandEnabled(const std::string& command) {
}
bool TestRunnerForSpecificView::CallShouldCloseOnWebView() {
- return web_view()->mainFrame()->dispatchBeforeUnloadEvent();
+ if (web_view()->mainFrame()->toWebLocalFrame()->dispatchBeforeUnloadEvent(
+ false) == blink::WebLocalFrame::BeforeUnloadReturnValue::Proceed) {
+ return true;
+ }
+
+ return false;
}
void TestRunnerForSpecificView::SetDomainRelaxationForbiddenForURLScheme(
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698