fix: isolate ICDB checks and recover scoped native sessions

This commit is contained in:
阿白叔 committed 2026-11-05 21:52:38 +08:00
1 parent 1acfbd6374
commit 1bd7589fef
82 files changed
+7770 -1583

No files matched your search

+12
View File
@@ -86,6 +86,18 @@ def test_probe_keeps_visible_non_dialog_classes():
assert snapshots[0].process_name == "proc-1010.exe"
def test_pid_scope_excludes_foreign_dialog_before_child_or_uia_read():
gui = FakeGui({10: {'class_name': '#32770', 'text': 'owned'},
20: {'class_name': '#32770', 'text': 'other project'}})
class Uia:
def controls(self, hwnd):
assert hwnd == 10, 'Foreign project was probed'
return ()
probe = make_probe(gui, (20, 10), Uia())
assert [w.hwnd for w in probe.capture(PHASE, pids={1010})] == [10]
assert probe.capture(PHASE, pids=set()) == ()
def test_disappearing_window_is_skipped_without_hiding_other_windows():
gui = FakeGui({
10: {"class_name": "GXWND", "text": "gone"},