diff options
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index 6f91aaa..2f3fa75 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -147,6 +147,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) : BindMethod("accessStoredWebScriptObject", &LayoutTestController::accessStoredWebScriptObject); BindMethod("objCClassNameOf", &LayoutTestController::objCClassNameOf); BindMethod("addDisallowedURL", &LayoutTestController::addDisallowedURL); + BindMethod("callShouldCloseOnWebView", &LayoutTestController::callShouldCloseOnWebView); BindMethod("setCallCloseOnWebViews", &LayoutTestController::setCallCloseOnWebViews); BindMethod("setPrivateBrowsingEnabled", &LayoutTestController::setPrivateBrowsingEnabled); BindMethod("setUseDashboardCompatibilityMode", &LayoutTestController::setUseDashboardCompatibilityMode); @@ -809,6 +810,12 @@ void LayoutTestController::setIconDatabaseEnabled(const CppArgumentList& args, result->SetNull(); } +void LayoutTestController::callShouldCloseOnWebView( + const CppArgumentList& args, CppVariant* result) { + bool rv = shell_->webView()->dispatchBeforeUnloadEvent(); + result->Set(rv); +} + // // Unimplemented stubs // diff --git a/webkit/tools/test_shell/layout_test_controller.h b/webkit/tools/test_shell/layout_test_controller.h index 7e88d80..01ea79b 100644 --- a/webkit/tools/test_shell/layout_test_controller.h +++ b/webkit/tools/test_shell/layout_test_controller.h @@ -200,6 +200,7 @@ class LayoutTestController : public CppBoundClass { void accessStoredWebScriptObject(const CppArgumentList& args, CppVariant* result); void objCClassNameOf(const CppArgumentList& args, CppVariant* result); void addDisallowedURL(const CppArgumentList& args, CppVariant* result); + void callShouldCloseOnWebView(const CppArgumentList& args, CppVariant* result); void setCallCloseOnWebViews(const CppArgumentList& args, CppVariant* result); void setPrivateBrowsingEnabled(const CppArgumentList& args, CppVariant* result); |