/rc webpanel status|close
Status prints one redacted line (WebPanelApi.Describe plus the address space); close closes the live panel. Neither opens a URL. WebPanelHost.Describe now reports visible/focused/in-browser instead of raw flags; the stacked test-hook summaries are put back on their own members. ChatCommandReplyTests covers the verb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ba7d96c7d9
commit
bfb87aba04
4 changed files with 31 additions and 2 deletions
|
|
@ -222,7 +222,7 @@ internal sealed unsafe class WebPanelHost
|
|||
string thread = _thread == null ? "not started" : _threadDone ? "stopped" : "running";
|
||||
string status = ((WebPanelStatusCode)_status).ToString();
|
||||
return $"web panel: thread {thread}{(_shuttingDown ? " (shut down)" : "")}, handle {_live}, {status}, error {_error}, " +
|
||||
$"http {_http}, navigations {_navCount}, environments {_environmentCount}, flags {_flags}, browser pid {_browserPid}, url {WebPanelUrlPolicy.Redact(_liveUrl)}";
|
||||
$"http {_http}, navigations {_navCount}, environments {_environmentCount}, visible {((_flags & StateVisible) != 0 ? "yes" : "no")}, focused {((_flags & StateFocused) != 0 ? "yes" : "no")}, in browser {((_flags & StateOpenedInBrowser) != 0 ? "yes" : "no")}, browser pid {_browserPid}, url {WebPanelUrlPolicy.Redact(_liveUrl)}";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -266,9 +266,9 @@ internal sealed unsafe class WebPanelHost
|
|||
internal bool ThreadRunningForTests { get { lock (_sync) return _thread != null && !_threadDone && _thread.IsAlive; } }
|
||||
internal bool PostForTests(Action<CoreWebView2?> a) => Post(() => a(_web));
|
||||
internal bool PanelOpenForTests => _open;
|
||||
/// <summary>A failure arriving late for <paramref name="handle"/> (the harness passes a superseded one).</summary>
|
||||
/// <summary>A renderer-unresponsive report, as WebView2 would raise it (counting against UnresponsiveLimit).</summary>
|
||||
internal bool UnresponsiveForTests() => Post(() => HandleProcessFailed(CoreWebView2ProcessFailedKind.RenderProcessUnresponsive));
|
||||
/// <summary>A failure arriving late for <paramref name="handle"/> (the harness passes a superseded one).</summary>
|
||||
internal bool FailForTests(int handle) => Post(() => Fail(handle, WebPanelCode.ProcessFailed, "synthetic (harness)", allowFallback: false));
|
||||
|
||||
// ============================ panel thread ============================
|
||||
|
|
|
|||
Loading…
Reference in a new issue