Battle.net installer now working. It crashes when the login page loads, but that seems to be fixed in upcoming version and the controls did read.
This commit is contained in:
1 parent
38358ad27a
commit
e0c83859f5
13 files changed
+753
-11
No files matched your search
@@ -20,7 +20,7 @@ parser.add_argument("--build-dir", default="build")
|
||||
parser.add_argument("--session", action="store_true")
|
||||
parser.add_argument("--reader", choices=("cthulhu", "orca"))
|
||||
parser.add_argument("--extension-endpoint", action="store_true")
|
||||
parser.add_argument("--fixture", choices=("menu", "edit", "notepad", "list", "listbox", "delphi", "winforms", "controls", "scintilla", "goldwave"), default="menu")
|
||||
parser.add_argument("--fixture", choices=("menu", "edit", "notepad", "list", "listbox", "delphi", "winforms", "controls", "scintilla", "goldwave", "bootstrapper"), default="menu")
|
||||
parser.add_argument("--notepadpp-exe", type=Path)
|
||||
parser.add_argument("--goldwave-exe", type=Path)
|
||||
parser.add_argument("--32-bit", dest="is32Bit", action="store_true")
|
||||
@@ -28,8 +28,8 @@ parser.add_argument("--late-helper", action="store_true")
|
||||
parser.add_argument("--restart-helper", action="store_true")
|
||||
add_test_options(parser)
|
||||
args = parser.parse_args()
|
||||
if args.is32Bit and args.fixture not in ("menu", "edit", "winforms", "list", "listbox", "delphi", "controls"):
|
||||
parser.error("32-bit checks currently require --fixture menu, edit, winforms, list, listbox, delphi or controls")
|
||||
if args.is32Bit and args.fixture not in ("menu", "edit", "winforms", "list", "listbox", "delphi", "controls", "bootstrapper"):
|
||||
parser.error("32-bit checks currently require --fixture menu, edit, winforms, list, listbox, delphi, controls or bootstrapper")
|
||||
if (args.late_helper or args.restart_helper) and args.fixture not in ("edit", "winforms", "scintilla"):
|
||||
parser.error("helper lifecycle checks require --fixture edit, winforms or scintilla")
|
||||
if args.fixture == "scintilla" and (not args.notepadpp_exe or not args.notepadpp_exe.is_file()):
|
||||
@@ -108,11 +108,16 @@ with wine_test_directory(prefix="wine-access-menus-") as temporary:
|
||||
sourceName = "edit" if args.fixture == "winforms" else args.fixture
|
||||
if args.fixture == "delphi":
|
||||
sourceName = "list"
|
||||
isBootstrapper = args.fixture == "bootstrapper"
|
||||
if isBootstrapper:
|
||||
compiler = compiler.replace("gcc", "g++")
|
||||
subprocess.run([compiler, "-Wall", "-Wextra", "-mwindows",
|
||||
*(["-static"] if isBootstrapper else []),
|
||||
*(["-DWINE_ACCESS_WINFORMS_FIXTURE"] if args.fixture == "winforms" else []),
|
||||
*(["-DWINE_ACCESS_DELPHI_FIXTURE"] if args.fixture == "delphi" else []),
|
||||
"-o", str(fixture), str(Path(__file__).with_name(sourceName + "_fixture.c")),
|
||||
"-luser32", "-lcomctl32", "-loleacc", "-lole32", "-ladvapi32"], check=True)
|
||||
"-o", str(fixture), str(Path(__file__).with_name(sourceName + ("_fixture.cpp" if isBootstrapper else "_fixture.c"))),
|
||||
"-luser32", "-lcomctl32", "-loleacc", "-lole32", "-ladvapi32",
|
||||
*(["-luiautomationcore", "-loleaut32", "-luuid"] if isBootstrapper else [])], check=True)
|
||||
helper = None
|
||||
app = None
|
||||
try:
|
||||
@@ -160,6 +165,43 @@ with wine_test_directory(prefix="wine-access-menus-") as temporary:
|
||||
assert event[0] == focused, f"text sent without establishing focus: {event!r}"
|
||||
elif event[1] == "value" and event[3] == "combo box":
|
||||
assert event[0] == focused, f"combo value sent for an unfocused source: {event!r}; focus={focused}; events={events!r}"
|
||||
if args.fixture == "bootstrapper":
|
||||
uiaEvents = [e for e in events if ":bootstrapper-uia:" in e[0]]
|
||||
for event in uiaEvents:
|
||||
print(event[1:9])
|
||||
# Focus can arrive before the native hook's state reply. It must
|
||||
# then be followed by a known state for that same focused source.
|
||||
for index, event in enumerate(uiaEvents):
|
||||
if event[3] == "check box" and not event[5]:
|
||||
assert event[1] == "focus", f"lost a previously known checkbox state: {event!r}"
|
||||
assert index + 1 < len(uiaEvents) and uiaEvents[index + 1][0] == event[0] and uiaEvents[index + 1][5], \
|
||||
f"checkbox state never arrived after focus: {uiaEvents[index:]!r}"
|
||||
knownEvents = [e for e in uiaEvents if e[3] != "check box" or e[5]]
|
||||
assert [e[2:5] for e in knownEvents] == [
|
||||
("Select a Language", "combo box", "English (United States)"),
|
||||
("Select a Language", "combo box", "French"),
|
||||
("Continue", "push button", ""),
|
||||
("Select a Language", "combo box", "French"),
|
||||
("Password", "edit", ""),
|
||||
("Unknown protection", "edit", ""),
|
||||
("Select a Language", "combo box", "English (United States)"),
|
||||
("Launch on startup", "check box", ""),
|
||||
("Launch on startup", "check box", ""),
|
||||
("Launch on startup", "check box", ""),
|
||||
("Launch on startup", "check box", ""),
|
||||
("Continue", "push button", ""),
|
||||
("Launch on startup", "check box", ""),
|
||||
("Launch on startup", "check box", ""),
|
||||
], f"missing, repeated or background bootstrapper feedback: {uiaEvents!r}"
|
||||
assert [e[1] for e in knownEvents[:7]] == ["focus", "value"] + ["focus"] * 5
|
||||
checkboxEvents = [e for e in knownEvents if e[3] == "check box"]
|
||||
assert [e[1] for e in checkboxEvents[1:4]] == ["state"] * 3
|
||||
assert [e[5] for e in checkboxEvents] == [
|
||||
"not checked", "checked", "not checked", "half checked, unavailable", "half checked, unavailable", "checked"]
|
||||
assert "password" in uiaEvents[4][5], "protected control lost its state"
|
||||
assert len({e[0] for e in uiaEvents if e[3] == "combo box"}) == 1
|
||||
print("PASS: UIA selector values, native Toggle checked/unchecked/mixed, focus/return, deduplication, protected/unknown values, background exclusion")
|
||||
sys.exit(0)
|
||||
if args.fixture == "goldwave":
|
||||
for event in events:
|
||||
print(event[1:9])
|
||||
|
||||
Reference in new issue
Block a user