Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0d9e6052f94fca462ca399257a48c5be5cd21aad
https://github.com/WebKit/WebKit/commit/0d9e6052f94fca462ca399257a48c5be5cd21aad
Author: Dana Estra <[email protected]>
Date: 2026-05-18 (Mon, 18 May 2026)
Changed paths:
M
LayoutTests/media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html
M LayoutTests/resources/ui-helper.js
M Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm
Log Message:
-----------
media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html
is a constant timeout on iOS and constant text failure on mac
https://bugs.webkit.org/show_bug.cgi?id=314648
rdar://176606830
Reviewed by Wenson Hsieh.
text-track-selected-via-media-api.html needs to be updated to reflect the
new structure of the media controls context menu, which changed when the
feature CaptionDisplaySettings became enabled by default. Now, the text tracks
are accessed through a languages submenu.
The layout test has a javascript helper function contextMenuItem() that returns
a context menu item representing a given language string. The test uses the
return
value to check that the appropriate language tracks are checked/unchecked. This
patch modifies contextMenuItem() to navigate through the languages submenu to
reach the needed context menu items.
The test uses UIHelper to simulate clicking/tapping on the context menu items.
This
patch modifies the iOS path of the layout test to first call
UIHelper.chooseMenuAction("Languages") before
UIHelper.chooseMenuAction("French"),
as the track items are only revealed after the Languages submenu has been
opened.
The approach used on iOS does not work on mac:
UIScriptControllerMac::UIHelperchooseMenuAction("Languages") simulates clicking
the
languages menu item and then closing the menu, hence the subsequent
UIHelperchooseMenuAction("French") cannot find the nested French menu item.
Instead, this patch
modifies UIScriptControllerMac::chooseMenuAction to recursively search through
nested
submenus to find a given item, and as a result, only
UIHelper.chooseMenuAction("French")
is needed on mac. The recursive search is a breadth first search, given that
almost
all callers of UIScriptControllerMac::UIHelperchooseMenuAction are looking for
a menu
item on the top level.
*
LayoutTests/media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html:
* LayoutTests/resources/ui-helper.js:
(window.UIHelper.async chooseLanguageInMediaContextMenu):
* Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::chooseMenuAction):
Canonical link: https://commits.webkit.org/313424@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications