Bug 214344 - [GTK4] Enable API tests
Summary: [GTK4] Enable API tests
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
Depends on: 214251
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2020-07-15 01:43 PDT by Carlos Garcia Campos
Modified: 2020-07-30 01:54 PDT (History)
14 users (show)

See Also:


Attachments
Patch (51.76 KB, patch)
2020-07-15 01:48 PDT, Carlos Garcia Campos
aperez: review+
Details | Formatted Diff | Diff
Patch for landing (52.22 KB, patch)
2020-07-30 01:10 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch for landing (52.26 KB, patch)
2020-07-30 01:27 PDT, Carlos Garcia Campos
no flags 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 2020-07-15 01:43:52 PDT
.
Comment 1 Carlos Garcia Campos 2020-07-15 01:48:03 PDT
Created attachment 404327 [details]
Patch
Comment 2 Adrian Perez 2020-07-27 02:35:29 PDT
Comment on attachment 404327 [details]
Patch

Looks fine, I have written a few comments below which you may want to
check before landing :)


View in context: https://bugs.webkit.org/attachment.cgi?id=404327&action=review

> Tools/TestWebKitAPI/Tests/WebKitGtk/AccessibilityTestServer.cpp:97
> +    GMainLoop* loop = g_main_loop_new(nullptr, TRUE);

This never gets freed, I would use “GRefPtr<GMainLoop>” here here to avoid a
false positive when using Valgrind (or any other tools) to find leaks. Or use
“g_autoptr(GMainLoop)”, or a plain “g_clear_pointer(&loop, g_main_loop_unref)”.

> Tools/TestWebKitAPI/Tests/WebKitGtk/InspectorTestServer.cpp:48
> +    GMainLoop *loop = g_main_loop_new(nullptr, TRUE);

Same here.

> Tools/TestWebKitAPI/Tests/WebKitGtk/TestContextMenu.cpp:667
>  #if USE(GTK4)

Why not remove the “#if” block completely? If the idea is to keep the comment
below for when the tests disabled for GTK4 are brought back then I think it is
okay to leave it around.

> Tools/TestWebKitAPI/Tests/WebKitGtk/TestInspector.cpp:278
> +            m_inspectorWindow = nullptr;

Probably I would move the “m_inspectorWindow = nullptr;” line out of the
#if-#endif block, because it's repeated in both cases; but I do not have
a strong opinion on this—feel free to leave it as-is if you think it's more
legible.
Comment 3 Carlos Garcia Campos 2020-07-30 01:10:29 PDT
Created attachment 405556 [details]
Patch for landing
Comment 4 EWS Watchlist 2020-07-30 01:11:08 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 5 Carlos Garcia Campos 2020-07-30 01:27:52 PDT
Created attachment 405557 [details]
Patch for landing
Comment 6 Carlos Garcia Campos 2020-07-30 01:53:36 PDT
Committed r265080: <https://trac.webkit.org/changeset/265080>
Comment 7 Radar WebKit Bug Importer 2020-07-30 01:54:18 PDT
<rdar://problem/66317614>