@@ -147,31 +147,6 @@ end run
147147APPLESCRIPT
148148}
149149
150- ax_keyed_menu_count() {
151- local pid= " $1"
152- osascript_with_timeout - " $pid" << 'APPLESCRIPT '
153- on run argv
154- set targetPID to item 1 of argv as integer
155- set keyedItems to 0
156- tell application " System Events"
157- set targetProcesses to every application process whose unix id is targetPID
158- if (count of targetProcesses) is not 1 then error " Headless accessibility process was not found"
159- tell item 1 of targetProcesses
160- repeat with topLevelItem in menu bar items of menu bar 1
161- repeat with candidate in menu items of menu 1 of topLevelItem
162- if exists attribute " AXMenuItemCmdChar" of candidate then
163- set commandCharacter to value of attribute " AXMenuItemCmdChar" of candidate
164- if commandCharacter is not missing value and commandCharacter is not "" then set keyedItems to keyedItems + 1
165- end if
166- end repeat
167- end repeat
168- end tell
169- end tell
170- return keyedItems
171- end run
172- APPLESCRIPT
173- }
174-
175150ax_press_menu_item() {
176151 local pid= " $1" menu_title= " $2" item_title= " $3"
177152 osascript_with_timeout - " $pid" " $menu_title" " $item_title" << 'APPLESCRIPT '
@@ -602,11 +577,6 @@ Window Pin on Top p 2
602577Help Headless Help / 1
603578SHORTCUTS
604579assert_system_full_screen_shortcut " $HOST_PID"
605- KEYED_MENU_COUNT= " $(ax_keyed_menu_count " $HOST_PID" )"
606- if [[ " $KEYED_MENU_COUNT" != 25 ]]; then
607- echo " Headless exposed $KEYED_MENU_COUNT keyed menu items, expected the 25-item catalog" > & 2
608- fail
609- fi
610580for settings_title in " Settings" " Settings…" " Preferences" " Preferences…" ; do
611581 if [[ " $(ax_menu_exists " $HOST_PID" Headless " $settings_title" )" == true ]]; then
612582 echo " $settings_title is shipped but has no Cmd-, coverage" > & 2
0 commit comments