Bug 135412

Summary: [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, berto, commit-queue, gustavo, mrobinson, pnormand, svillar
Priority: P2 Keywords: Gtk, Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch pnormand: review+

Description Carlos Garcia Campos 2014-07-30 00:57:05 PDT
ERROR:../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:455:void testWebViewDisallowModalDialogs(ModalDialogsTest*, gconstpointer): assertion failed (events.size() == 0): (4 == 0)

The problem is that WebPageProxy::setUIClient() calls setCanRunModal() with the value of m_uiClient->canRunModal() which is always true for us. We override that manually by calling setCanRunModal() depending on the WebKitSettings. In r171742, webkitWebViewUpdateSettings(), the method that overrides setCanRunModal(), was moved before attachUIClientToView(), so the value set by WebPageProxy::setUIClient() is the last one and take precedence. We need to make sure webkitWebViewUpdateSettings() is always called after attachUIClientToView().
Comment 1 Carlos Garcia Campos 2014-07-30 01:00:02 PDT
Created attachment 235736 [details]
Patch
Comment 2 WebKit Commit Bot 2014-07-30 01:02:34 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Carlos Garcia Campos 2014-07-30 03:53:00 PDT
Committed r171796: <http://trac.webkit.org/changeset/171796>