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

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: Now only calling BeforeUnload from the embedder 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
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 2d0597ab35ef5f5941235f9e3da67d9e2a826413..f0295e4137117a9bbca91738fd471d84c5e196b0 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -2228,7 +2228,13 @@ bool TestRunnerForSpecificView::IsCommandEnabled(const std::string& command) {
}
bool TestRunnerForSpecificView::CallShouldCloseOnWebView() {
- return web_view()->mainFrame()->dispatchBeforeUnloadEvent();
+ bool proceed = false;
+ if (!web_view()->mainFrame()->toWebLocalFrame()->dispatchBeforeUnloadEvent(
+ &proceed)) {
+ return false;
+ }
+
+ return proceed;
}
void TestRunnerForSpecificView::SetDomainRelaxationForbiddenForURLScheme(
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698