Commit Graph
253 Commits
Author SHA1 Message Date
ldm0 fd61a88eab test(navigation): verify renderer replacement in Navigation API entries
Extracted from wpt-misc-fix commit b49269043e3ab8e9908a8e7ddc3c1791fec515f1.
2026-11-18 22:05:06 +08:00
ldm0 d9f30c7326 test(cdp): check popup navigation subscription replies
Extracted from wpt-misc-fix commit 83a83656b2442e3145b250e5a98199ca7c62a4b4.
2026-11-18 21:37:23 +08:00
ldm0 2bd6009e66 test(cdp): cover module completion after named popup reuse
Extracted from wpt-misc-fix commit 94e351cd05a2efe132f4c6b683b7ca6d9c0d8889.
2026-11-18 21:36:50 +08:00
ldm0 910122fb45 refactor(webdriver): move upload paths into file admission 2026-11-16 19:42:47 +08:00
ldm0 47399e4ec6 fix(files): prepare shared directory selections off the protocol thread 2026-11-16 19:42:47 +08:00
ldm0 f10e9c0bcf refactor(files): retain lazy file backings for selected uploads 2026-11-16 19:42:47 +08:00
ldm0 8b6e73d773 fix(files): support directory uploads and relative file paths 2026-11-16 19:42:47 +08:00
ldm0 5435b97e3f fix(cdp): publish runtime readiness for pipe sessions
Notify the embedder after the shared CDP owner is initialized and before
waiting for pipe input. Describe readiness in terms of the protocol
transport so the contract covers both TCP and pipe sessions.

Exercise the public pipe API with ace-protocol enabled: publish one usable
handle before any incoming CDP command, then revoke it after EOF. Repeat
for a second serving invocation. The new case times out without the hook.
2026-11-16 01:20:01 +08:00
sicko7947andClaude Sonnet 5.5 73eb3b005e feat(cli): serve one CDP session over Chromium's remote debugging pipe
`moli serve --remote-debugging-pipe` reads NUL-terminated CDP messages from
inherited file descriptor 3 and writes replies to descriptor 4, like
Chromium's flag of the same name. No listener is bound, so a parent process
can drive a private browser without choosing or exposing a port. The session
ends at EOF on the input pipe or on Browser.close.

- The CLI claims descriptors 3 and 4 once, after checking that both are pipes
  or sockets, and hands them to `ProtocolServer::serve_pipe` as `OwnedFd`.
- The WebSocket writer is generic over any message sink, so the pipe shares
  its bounded queue and stall handling.
- Shutdown follows `serve_listener`: stop the CDP owner, drain, then flush
  storage on a blocking worker inside the shared shutdown budget, reporting a
  failed flush.
- An inbound message is limited to the WebSocket transport's 64 MiB and is
  rejected as soon as it exceeds that.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 01:20:01 +08:00
ldm0 342b83fd6e fix(webdriver): preserve reverse key release order 2026-11-15 16:56:15 +08:00
ldm0 1a752c0181 fix(webdriver): preserve raw key locations in actions 2026-11-15 16:56:15 +08:00
ldm0 dd9e8a4ddf fix(window): preserve active auxiliary BarProp visibility during close
Source-commit: f252bdf404
2026-11-15 01:29:28 +08:00
ldm0 1fc3848c6c fix(download): stream child-frame attachments with sandbox checks 2026-11-14 23:13:54 +08:00
ldm0 0e3dae13cd refactor(inspector): own helper leases and remove legacy tracking 2026-11-14 02:13:16 +08:00
ldm0 95dbc88a4f refactor(cdp): keep event validation at build and test time 2026-11-14 00:44:58 +08:00
ldm0 6650c81e73 fix(cdp): finish event migration and report rejected batches 2026-11-14 00:44:58 +08:00
ldm0 59c47a2f93 fix(cdp): enforce advertised event names at frontend output 2026-11-14 00:44:58 +08:00
ldm0 f4d868c244 refactor(cdp): require typed local event construction 2026-11-14 00:44:58 +08:00
ldm0 efbeb470e5 fix(cdp): abort document requests handed off to downloads 2026-11-13 22:44:23 +08:00
ldm0 9e357b95e4 feat(xhr): keep network interception live during synchronous sends
Route intercepted Window and dedicated Worker XHR through shared native
request, authentication and response decisions. One-shot pause ports let the
existing protocol/session machinery continue, fail or fulfill a request
without queueing a Page command behind its suspended JavaScript stack.

Publish native network facts across an explicit synchronous-wait scope, preserve
normal asynchronous streaming delivery, and cancel loads before owner
teardown. Remove the synchronous-only URL-rule copy and retain the canonical
protocol matcher, session chains and request identities.

Cover Page task suspension, independent protocol decisions, binary overrides,
CORS preflight, authentication, redirects, streaming, multi-session cleanup,
Worker termination and target close. Await actual callback/command identities
where network acknowledgements no longer imply Page delivery has finished.
2026-11-13 22:37:15 +08:00
ldm0 d9e3622aa4 fix(bidi): ignore fragments in string interception rules 2026-11-13 22:37:15 +08:00
ldm0 e8ce829d88 fix(xhr): enforce exact interception URLs for synchronous requests 2026-11-13 22:37:15 +08:00
ldm0 b27aeb1c8f fix(network): report only actual response interception pauses 2026-11-13 22:37:15 +08:00
ldm0 5a6cdc5e86 fix(protocol): acknowledge stop-loading before Native cleanup 2026-11-13 21:26:12 +08:00
ldm0 084e4930c6 test(protocol): observe self-close completion from the live opener 2026-11-13 21:26:12 +08:00
ldm0 724f86fbd6 fix(webdriver): bound Classic alert navigation waits 2026-11-13 21:26:12 +08:00
ldm0 c376d468c4 fix(webdriver): return HTTP 500 for timeout errors 2026-11-13 21:26:12 +08:00
ldm0 963ad1a942 fix(webdriver): interrupt Classic navigation waits for live dialogs 2026-11-13 21:26:12 +08:00
ldm0 d5220c536b fix(protocol): keep existing dialogs handleable during navigation 2026-11-13 21:26:12 +08:00
ldm0 4a9ed35dd5 fix(protocol): keep command progress local to sessions and input owners
Give BiDi commands independent admission, Native and navigation waits instead
of retaining the socket turn or a single Runtime slot. Share input state by
top-level host, retain its performActions queue, and allow release/control work
during pauses without applying future input state early.

Keep CDP navigation queues local to their sessions, project independent output
while another page is modal, and recover Worker network ownership from its
original session. Preserve exact host bindings, renderer/load predecessors,
original Runtime results and actual realm-retirement ordering.

Validate with cargo fmt --all, workspace Clippy (all targets/features, warnings
denied), and cargo nextest run --no-fail-fast: 23,068 passed, 20 existing skips.
2026-11-13 21:26:12 +08:00
lanyue-llk 58da945c91 fix(page): stop parsing a streaming document after Page.stopLoading 2026-11-13 21:09:10 +08:00
ldm0 8f139fd884 refactor(cdp): generate discovery schema at build time 2026-11-13 17:58:54 +08:00
ldm0 d1473e962f build(cdp): embed protocol metadata with Brotli quality 11 2026-11-13 17:58:54 +08:00
ldm0 bc6ffe8870 fix(protocol-server): advertise Tracing result events 2026-11-13 17:58:54 +08:00
ldm0 6fe7d26fb3 fix(protocol-server): publish complete supported CDP schemas 2026-11-13 17:58:54 +08:00
Neo 孫 b6465b00c3 fix(protocol-server): advertise every implemented CDP domain in /json/protocol
/json/protocol served V8's js_protocol verbatim (Schema, Runtime, Debugger,
Console, Profiler, HeapProfiler), while the dispatcher implements 29 more
domain groups (Page, DOM, Network, Target, Input, Emulation, ...). Clients
that gate calls on the advertised protocol refused commands Moli supports.

- Derive strum::VariantNames on the action enums the dispatcher parses
  methods against, and expose moli_protocol::implemented_cdp_commands()
  (domain -> wire command names). Generated from the implementation, so
  it cannot drift.
- /json/protocol merges that list into the V8 schema once (OnceLock):
  V8 domains keep full schemas and gain any missing command names;
  Moli-implemented domains list command names only, with a description
  saying parameter schemas are not published.
- The embedded CDP_PROTOCOL_JSON constant is unchanged, so
  embedded_protocol_preserves_the_complete_vendored_schema still holds.

Tests: wire names (getFullAXTree, getDOMStorageItems, navigate; 29
domains) and the discovery endpoint test now asserts Page / DOM /
Network / Target / Runtime / Input and Page.navigate are advertised.
Reverting to the verbatim V8 schema fails it ("must advertise Page").
fmt and clippy -D warnings clean for both crates.
2026-11-13 17:58:54 +08:00
ldm0 d6046d2725 fix(bidi): own document admission in pending Runtime commands
Keep the socket actor responsive while a context-targeted Runtime command waits for its Document. Retain the original host and session binding until admission can validate and dispatch in one finite owner turn. Cover close, replacement, navigation completion, session end and disconnect in standalone and Classic-attached BiDi, including exact-once responses and revoked identities.
2026-11-13 00:42:01 +08:00
ldm0 3e3bee3d75 fix(bidi): keep unrelated contexts live during navigation 2026-11-13 00:42:01 +08:00
ldm0 0967c3654a refactor(protocol): scope scheduler navigation prerequisites 2026-11-13 00:42:01 +08:00
ldm0 69d80ea742 refactor(protocol): remove source-owned Native insertion graphs 2026-11-12 20:44:39 +08:00
ldm0 b4abe33fc8 fix(protocol): preserve output order for overlapping insertions 2026-11-12 20:44:39 +08:00
ldm0 2fac328780 fix(protocol): unblock three-stream nested insertions 2026-11-12 20:44:39 +08:00
ldm0 ebf62d93b1 fix(cdp): finish accepted browser close despite reply failure 2026-11-12 20:44:39 +08:00
ldm0 97bb57bed0 fix(downloads): progress independently of command replies 2026-11-12 20:44:39 +08:00
ldm0 12dc4ba261 fix(protocol): preserve inserted Native stream successor order 2026-11-12 20:44:39 +08:00
ldm0 accf74494a refactor(protocol): remove redundant permission turns 2026-11-12 20:44:39 +08:00
ldm0 5c7a045b1b refactor(protocol): limit response barriers to explicit Inspector messages 2026-11-12 20:44:39 +08:00
ldm0 c7f75ceb7b fix(protocol): preserve native insertion order in source publications 2026-11-12 20:44:39 +08:00
user.email e8f6242344 fix(cdp): wait for pending frontend detach before reconnect 2026-11-12 20:10:31 +08:00
ldm0 02eb87a216 test(protocol): wait for asynchronous popup observations 2026-11-12 04:42:48 +08:00