Bug 135412 - [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
Summary: [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, Regression
Depends on:
Blocks:
 
Reported: 2014-07-30 00:57 PDT by Carlos Garcia Campos
Modified: 2014-07-30 03:53 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.54 KB, patch)
2014-07-30 01:00 PDT, Carlos Garcia Campos
pnormand: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>