Bug 187383 - [GTK][WPE] REGRESSION(r233111): Test /webkit/WebKitUserContentManager/script-message-received fails
Summary: [GTK][WPE] REGRESSION(r233111): Test /webkit/WebKitUserContentManager/script-...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, InRadar, Regression
Depends on:
Blocks:
 
Reported: 2018-07-06 02:38 PDT by Carlos Garcia Campos
Modified: 2018-07-09 01:11 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.63 KB, patch)
2018-07-06 02:41 PDT, Carlos Garcia Campos
zan: 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 2018-07-06 02:38:33 PDT
/webkit/WebKitUserContentManager/script-message-received:           Leaked objects: WebKitUserContentManager(0x5564fcabf210) WebKitWebView(0x5564fcc26fc0)
FAIL
ERROR:/home/slave/webkitgtk/gtk-linux-64-release/build/Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.h:133:Test::~Test(): assertion failed: (m_watchedObjects.isEmpty())

This is actually a problem in the test itself. The problem is that we run js, connect to message-received and quite the main loop when the message is received, which happens before the run js operation has been completed. The test finishes early and since r233111 an IPC message is still pending (I guess the run js callback) and the web page is still protected. Just adding a run loop operation before finishing the test would fix it. We should wait for the js run to complete, instead of the message.
Comment 1 Carlos Garcia Campos 2018-07-06 02:41:22 PDT
Created attachment 344413 [details]
Patch
Comment 2 Adrian Perez 2018-07-06 03:35:33 PDT
Comment on attachment 344413 [details]
Patch

Nice find, r=me (informally).
Comment 3 Carlos Garcia Campos 2018-07-06 03:51:43 PDT
Committed r233576: <https://trac.webkit.org/changeset/233576>
Comment 4 Radar WebKit Bug Importer 2018-07-06 03:52:19 PDT
<rdar://problem/41886574>