test: cover locked session ignoring prefix overlay and passive keys
Adds test_standalone_headless_session_lock_no_overlay_or_disturb: while ext-session-lock holds the session, holding the tab prefix must not show the overlay and a passive key must leave the lock undisturbed with the session alive. Guards the removal of the session_locked early-return that swallowed every key (PIN typing now reaches the locker). Verified to fail on the pre-fix compositor and pass after.
This commit is contained in:
parent
498ee6db35
commit
b149cf9461
1 changed files with 32 additions and 0 deletions
|
|
@ -5723,6 +5723,38 @@ def test_standalone_headless_session_lock_locker_dies(tmp_path):
|
|||
pass
|
||||
|
||||
|
||||
def test_standalone_headless_session_lock_no_overlay_or_disturb(tmp_path):
|
||||
"""While the session is locked, holding the tab prefix must not show
|
||||
the overlay and a passive key must not disturb the lock: the overlay
|
||||
is gated on the lock (no tab list over the lock screen) and passive
|
||||
keys fall through to the lock surface instead of being swallowed,
|
||||
so typing a PIN reaches the locker. Regression test for the
|
||||
session_locked early-return that swallowed every key."""
|
||||
out = tmp_path / "lock.out"
|
||||
with _run_standalone(
|
||||
{"KICK_LOG": "2"},
|
||||
"%s --app-id testwin '#ff0000' 320x240" % WL,
|
||||
"%s --lock --lock-out '%s'" % (WL, out), wait="any") as s:
|
||||
assert _wait_out(out, "surface-config", timeout=10.0), \
|
||||
f"lock client never configured its surface: " \
|
||||
f"{(out.read_text().strip() if out.exists() else '(missing)')!r}"
|
||||
# Alt while locked: no overlay.
|
||||
pos = len(s.read_log())
|
||||
s.mods(ALT)
|
||||
time.sleep(1.5)
|
||||
s.mods(0)
|
||||
assert "[render] overlay show" not in s.read_log()[pos:], \
|
||||
"overlay appeared over the lock screen"
|
||||
_assert_alive(s, "compositor died on Alt while locked")
|
||||
# Passive key (A, evdev 30) while locked: consumed by the handler,
|
||||
# lock undisturbed, session survives.
|
||||
s.tap_ack(30)
|
||||
time.sleep(0.5)
|
||||
_assert_alive(s, "compositor died on passive key while locked")
|
||||
assert out.read_text().strip() == "surface-config", \
|
||||
f"lock state disturbed by passive key: {out.read_text().strip()!r}"
|
||||
|
||||
|
||||
def test_standalone_headless_screencopy_globals(globals_session, tmp_path):
|
||||
"""The compositor advertises the ext_image_copy_capture_manager_v1 and
|
||||
ext_output_image_capture_source_manager_v1 globals so a capture tool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue