[webkit-changes] [WebKit/WebKit] fce448: [GTK][WPE] Test `/webkit/WebKitWebExtension/user-m...

Vitaly Dyachkov noreply at github.com
Wed Aug 30 12:30:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fce44888e8cccc1dc2b35163195d27aaf62e7494
      https://github.com/WebKit/WebKit/commit/fce44888e8cccc1dc2b35163195d27aaf62e7494
  Author: Vitaly Dyachkov <vitaly at igalia.com>
  Date:   2023-08-30 (Wed, 30 Aug 2023)

  Changed paths:
    M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebProcessExtensions.cpp
    M Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessExtensionTest.cpp
    M Tools/TestWebKitAPI/glib/TestExpectations.json

  Log Message:
  -----------
  [GTK][WPE] Test `/webkit/WebKitWebExtension/user-messages` is flaky
https://bugs.webkit.org/show_bug.cgi?id=211336

Reviewed by Carlos Garcia Campos.

The last part of this test verifies that we get back message replies
from web process extensions.

At this point of the test, we have two web processes running, one per
web view. Thus we expect to get two replies.

Currently, we run the main loop and wait for the first reply. When we
get it we stop the main loop and then start it again and wait for the
second reply.

The problem is that the second reply might be sent exactly at the moment
when the main loop is stopped. Thus the message will not be handled and
the test will fail.

The solution to this problem is to wait until we get both messages and
only then stop the main loop to process them.

This patch also fixes the wrong message name comparison in
`extensionMessageReceivedCallback()`.

* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebProcessExtensions.cpp:
(UserMessageTest::contextUserMessageReceived):
(UserMessageTest::waitUntilContextMessagesReceived):
(UserMessageTest::waitUntilContextMessageReceived):
(testWebProcessExtensionUserMessages):
* Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessExtensionTest.cpp:
(extensionMessageReceivedCallback):
* Tools/TestWebKitAPI/glib/TestExpectations.json:

Canonical link: https://commits.webkit.org/267462@main




More information about the webkit-changes mailing list