| Index: components/test_runner/test_runner_for_specific_view.cc
|
| diff --git a/components/test_runner/test_runner_for_specific_view.cc b/components/test_runner/test_runner_for_specific_view.cc
|
| index 75b8d0d0475439642e4ecaf5c7329df7e73ab5d7..30d5082a915b0131874a3a40f012c5aa81f87aa1 100644
|
| --- a/components/test_runner/test_runner_for_specific_view.cc
|
| +++ b/components/test_runner/test_runner_for_specific_view.cc
|
| @@ -566,7 +566,13 @@ void TestRunnerForSpecificView::DidLosePointerLockInternal() {
|
| }
|
|
|
| bool TestRunnerForSpecificView::CallShouldCloseOnWebView() {
|
| - return web_view()->mainFrame()->dispatchBeforeUnloadEvent();
|
| + if (!web_view()->mainFrame()->toWebLocalFrame()) {
|
| + CHECK(false) << "This function cannot be called if the main frame is not a "
|
| + "local frame.";
|
| + }
|
| +
|
| + return web_view()->mainFrame()->toWebLocalFrame()->dispatchBeforeUnloadEvent(
|
| + false);
|
| }
|
|
|
| void TestRunnerForSpecificView::SetDomainRelaxationForbiddenForURLScheme(
|
|
|