Merge testing into deedra
Resolve the parity-ledger conflict by retaining testing's updated LibreOffice entry and Steam progress entry alongside deedra's edit-label and Mozilla records. Verified: go test ./... -count=1, go vet ./..., parity ledger validation, and whitespace checks. Native GUI and physical speech/Braille acceptance were not run.
This commit is contained in:
commit
548a43aa24
66 files changed
+2548
-129
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8">
|
||||
<title>Cthulhu Browser Probe</title>
|
||||
<label>Probe start <input autofocus></label>
|
||||
<button id="update">Update progress</button>
|
||||
<label for="native">Native progress</label>
|
||||
<progress id="native" max="100" value="0"></progress>
|
||||
<div id="aria" role="progressbar" aria-label="ARIA progress"
|
||||
aria-valuemin="0" aria-valuemax="100" aria-valuenow="10"></div>
|
||||
<span id="shader">Processing Vulkan shaders (0%)</span>
|
||||
<script>
|
||||
document.getElementById('update').addEventListener('click', () => {
|
||||
document.getElementById('native').value = 20;
|
||||
document.getElementById('aria').setAttribute('aria-valuenow', '30');
|
||||
document.getElementById('shader').textContent = 'Processing Vulkan shaders (37%)';
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@@ -2,6 +2,7 @@
|
||||
<office:document
|
||||
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
|
||||
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
|
||||
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
|
||||
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
|
||||
office:version="1.2"
|
||||
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
|
||||
@@ -11,6 +12,9 @@
|
||||
<table:table-row>
|
||||
<table:table-cell office:value-type="string"><text:p>Alpha</text:p></table:table-cell>
|
||||
<table:table-cell office:value-type="float" office:value="42"><text:p>42</text:p></table:table-cell>
|
||||
<table:table-cell table:formula="of:=[.B1]+1" office:value-type="float" office:value="43"><text:p>43</text:p></table:table-cell>
|
||||
<table:table-cell table:formula='of:=""' office:value-type="string"><text:p/></table:table-cell>
|
||||
<table:table-cell table:formula='of:="two spaces"' office:value-type="string" office:string-value="two spaces"><text:p>two spaces</text:p></table:table-cell>
|
||||
</table:table-row>
|
||||
<table:table-row>
|
||||
<table:table-cell/>
|
||||
|
||||
@@ -10,6 +10,7 @@ import time
|
||||
|
||||
|
||||
BROWSER_PROOFS = {
|
||||
"progress": ("./internal/app", "^TestNativeBrowserProgress$", 30, 35, "browser-progress.html"),
|
||||
"fragments": ("./internal/review", "^TestNativeBrowserFragmentLines$", 30, 35, "browser-fragments.html"),
|
||||
"positions": ("./internal/atspi", "^TestNativeBrowserSetPositions$", 25, 30, "browser-positions.html"),
|
||||
"tabs": ("./internal/app", "^TestNativeBrowserTabs$", 30, 35),
|
||||
|
||||
@@ -100,7 +100,37 @@ def run_inside():
|
||||
application.wait(timeout=5)
|
||||
|
||||
|
||||
def select_disjoint():
|
||||
"""Mutate only the disposable fixture, without walking sheet cells."""
|
||||
if os.environ.get("CTHULHU_NATIVE_LIBREOFFICE") != "1":
|
||||
raise RuntimeError("Selection helper requires the private Calc harness")
|
||||
import gi
|
||||
gi.require_version("Atspi", "2.0")
|
||||
from gi.repository import Atspi
|
||||
|
||||
pending = [Atspi.get_desktop(0)]
|
||||
remaining = 2500
|
||||
while pending and remaining:
|
||||
node = pending.pop()
|
||||
remaining -= 1
|
||||
if node.get_role_name() == "table":
|
||||
if node.get_name() == "Sheet Second":
|
||||
node.clear_selection()
|
||||
node.select_child(0)
|
||||
node.select_child(2)
|
||||
return
|
||||
continue
|
||||
for index in range(min(node.get_child_count(), 200)):
|
||||
child = node.get_child_at_index(index)
|
||||
if child is not None:
|
||||
pending.append(child)
|
||||
raise RuntimeError("Disposable selection fixture missing")
|
||||
|
||||
|
||||
def main():
|
||||
if sys.argv[1:] == ["--select-disjoint"]:
|
||||
select_disjoint()
|
||||
return
|
||||
if sys.argv[1:] == ["--inside"]:
|
||||
run_inside()
|
||||
return
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
"""Steam-shaped X11 browser and popup fixture for a private X server."""
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
from Xlib import X, Xatom, XK, display
|
||||
from Xlib.xobject.drawable import Window
|
||||
|
||||
|
||||
def main() -> None:
|
||||
connection = display.Display()
|
||||
root = connection.screen().root
|
||||
activeAtom = connection.intern_atom("_NET_ACTIVE_WINDOW")
|
||||
pidAtom = connection.intern_atom("_NET_WM_PID")
|
||||
|
||||
def make_window(parent: Window, width: int, height: int) -> Window:
|
||||
window = parent.create_window(0, 0, width, height, 0,
|
||||
connection.screen().root_depth,
|
||||
event_mask=X.KeyPressMask | X.KeyReleaseMask)
|
||||
window.change_property(pidAtom, Xatom.CARDINAL, 32, [os.getpid()])
|
||||
window.map()
|
||||
return window
|
||||
|
||||
steam = make_window(root, 800, 600)
|
||||
steam.set_wm_class("steamwebhelper", "steam")
|
||||
mainHost = make_window(steam, 800, 600)
|
||||
browser = make_window(mainHost, 800, 600)
|
||||
popupHost = make_window(steam, 300, 600)
|
||||
popup = make_window(popupHost, 300, 600)
|
||||
other = make_window(root, 800, 600)
|
||||
other.set_wm_class("example", "Example")
|
||||
otherChild = make_window(other, 800, 600)
|
||||
windows = dict(steam=steam, browser=browser, popup=popup,
|
||||
popupHost=popupHost, other=other, otherChild=otherChild)
|
||||
root.change_property(activeAtom, Xatom.WINDOW, 32, [steam.id])
|
||||
browser.set_input_focus(X.RevertToParent, X.CurrentTime)
|
||||
connection.sync()
|
||||
print(json.dumps({name: window.id for name, window in windows.items()}), flush=True)
|
||||
for line in sys.stdin:
|
||||
command = json.loads(line)
|
||||
action = command["action"]
|
||||
window = windows[command.get("window", "steam")]
|
||||
if action == "activate":
|
||||
root.change_property(activeAtom, Xatom.WINDOW, 32, [window.id])
|
||||
window.set_input_focus(X.RevertToParent, X.CurrentTime)
|
||||
elif action == "focus":
|
||||
window.set_input_focus(X.RevertToParent, X.CurrentTime)
|
||||
elif action == "unmap":
|
||||
window.unmap()
|
||||
elif action == "map":
|
||||
window.map()
|
||||
elif action == "destroy":
|
||||
window.destroy()
|
||||
elif action == "class":
|
||||
window.set_wm_class("example", "Example")
|
||||
elif action == "xterm":
|
||||
window.set_wm_class("xterm", "XTerm")
|
||||
elif action == "unknown":
|
||||
root.delete_property(activeAtom)
|
||||
elif action == "pid":
|
||||
window.change_property(pidAtom, Xatom.CARDINAL, 32, [os.getpid() + 1])
|
||||
elif action == "events":
|
||||
connection.sync()
|
||||
events = []
|
||||
while connection.pending_events():
|
||||
event = connection.next_event()
|
||||
if event.type in (X.KeyPress, X.KeyRelease):
|
||||
events.append({"window": event.window.id, "pressed": event.type == X.KeyPress,
|
||||
"escape": event.detail == connection.keysym_to_keycode(XK.string_to_keysym("Escape"))})
|
||||
print(json.dumps(events), flush=True)
|
||||
continue
|
||||
connection.sync()
|
||||
print("ready", flush=True)
|
||||
connection.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -6,10 +6,18 @@ that window once, retain its pending announcement across Wine control focus
|
||||
updates, and introduce it again after a foreground switch. Title changes
|
||||
within the window still follow the application's title-change preference.
|
||||
|
||||
Fresh input cancels titles still waiting for their coalescing deadline or an
|
||||
application override, as well as titles already in the speech queue. Held-key
|
||||
repeats retain automatic titles; Control and Escape remain explicit stop keys.
|
||||
Input that initiates a window switch precedes the destination's title and must
|
||||
not cancel that new introduction. Later title changes remain enabled normally.
|
||||
|
||||
Run the focused checks from the repository root:
|
||||
|
||||
```sh
|
||||
go test -race ./internal/app -run 'Title|WineReview|XTerm|Foreground' -count=1
|
||||
CTHULHU_NATIVE_BROWSER_TESTS=editing GOCACHE=/tmp/cthulhu-go-cache GOPROXY=off python3 tests/native_browser.py
|
||||
xvfb-run -a dbus-run-session -- env CTHULHU_NATIVE_WINDOW_TITLES=1 GOCACHE=/tmp/cthulhu-go-cache GOPROXY=off go test ./internal/app -run '^TestNativeAutomaticTitleDispatchLatency$' -count=1 -v
|
||||
dbus-run-session -- env CTHULHU_WINE_TITLE_DBUS=1 go test -race ./internal/app -run '^TestPrivateWineTitleSurvivesReviewFocusBurst$' -count=1 -v
|
||||
```
|
||||
|
||||
@@ -33,6 +41,14 @@ replacement with its user. Review and listening are required before submission.
|
||||
stay quiet. With the preference enabled, changed titles should speak once.
|
||||
5. If used, repeat with a Wine virtual desktop and check title messages on a
|
||||
physical Braille display.
|
||||
6. In Brave, use Ctrl+L and immediately type several characters. Each character
|
||||
should echo and interrupt previous speech without an older title following
|
||||
it. Repeat while a long title is speaking, and use Control and Escape to stop
|
||||
it. Switch away and back without typing; the window title must still speak.
|
||||
7. With automatic title reading enabled, change a page's title and verify it
|
||||
speaks once. The editing fixture's F8 key changes its title to
|
||||
"Cthulhu Browser Probe updated". Check address suggestions, deletion, and
|
||||
native caret movement still announce their usual output.
|
||||
|
||||
Automated queue assertions do not establish physical Alt+Tab, audible speech,
|
||||
installed-binary behavior, or physical Braille acceptance.
|
||||
Reference in new issue
Block a user