Bug 187383

Summary: [GTK][WPE] REGRESSION(r233111): Test /webkit/WebKitUserContentManager/script-message-received fails
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply, calvaris, cdumez, lforschler, webkit-bug-importer, zan
Priority: P2 Keywords: Gtk, InRadar, Regression
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch zan: review+

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>