Commit graph RynthCore/tools/WebPanelTests/WebPanelTests.csproj
Author SHA1 Message Date
Daniel Wallace
388f3fd908 Web panel host fix round 1: non-fatal process kinds, late failures, thread restart, focus and permission guards
- ProcessFailed: only BrowserProcessExited (teardown) and RenderProcessExited (about:blank, recreate on the next Open) fail the panel, as WebView2's docs describe the kinds; GPU, utility, sandbox, PPAPI and frame-only renderer exits are logged only. RenderProcessUnresponsive fails it at 3 reports within 30 s. The handler acts on the panel being served now.
- Fail decides "ignored" under the lock first and hides the panel only when the failure is live: a late failure for a superseded handle no longer hides the newer panel.
- The panel thread's finally restarts the thread when an Open is still queued and the host is not shutting down; _threadDone goes false only after StartStaThread returns.
- Show takes the foreground only when a window of this process (or of this panel's WebView2 browser process) holds it, never while the foreground is null. The visibility rule counts the browser process (CoreWebView2.BrowserProcessId) as ours, so the page's own dialogs do not hide the panel.
- ClipboardRead is allowed only for an allowlisted origin. NavigationStarting and NewWindowRequested fail closed on an exception.
- WebPanelApiRules: the ABI glue's pure parts (refusals, GetState Size check, state write), tested in WebPanelTests with WebPanelNativeArgs. WebPanelApi.LiveHandle and the browser pid in Describe for Task 4.
- Harness: GpuProcessCrashKeepsPanel and LateFailureForSupersededHandle (both RED before the fix), UnloadWhileVisibleCollected reports UNVERIFIED when the window was not visible, the game-side key count is informational. EngineSettingsTests: WebPanel default-on round trip and setter case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
0d5b9700db Web panel tests: back to invariant globalization, add lone-surrogate check
Matches the shipped engine; the surrogate host discriminates the IdnHost try/catch under invariant mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:07:33 -08:00
Daniel Wallace
e428f65c4d Web panel: IsAllowed fails closed on invalid IDN hosts
Uri.IdnHost throws UriFormatException for hosts like c<U+2100>; catch and reject. Test project now runs with ICU so the case is covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:07:33 -08:00
Daniel Wallace
0b0d2cb072 Web panel: URL, window and profile policies with offline tests
Pure C# policies (allowlist/redaction, visibility/layout, profile folder) plus tools/WebPanelTests (107 assertions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:07:33 -08:00