Commit Graph
599 Commits
Author SHA1 Message Date
ldm0 9760e04e2d fix(history): preserve queued same-document traversal steps
Queue each History back/forward/go delta as its own authorized traversal task and resolve the destination when that task runs. Keep the committed traversal position separate from synchronous history mutations, and use the canonical Window history for isolated-world calls. Preserve Navigation API result-bearing traversal behavior.

Cover consecutive and opposite deltas, initially out-of-range requests, synchronous pushState, canceled and reentrant traversals, child documents, and isolated worlds. Update old coalescing assertions and wait for actual browser-owned history commits in protocol tests.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (17584 passed, 13 skipped). Overlapping navigation WPT improves from 16/22 to 18/22, with both new cases passing all 8 subtests. Navigation API comparison preserves all 385 previously passing cases out of 432.

CDP smoke: 41/43 passed. The dom-input FileList upload failure reproduces on the parent binary; puppeteer could not start because Node is missing locally. Artifacts: target/wpt-history-traversal-20260908-lcpQpn/{before,confirmed,navigation-after,cdp,cdp-before}.
2026-11-22 02:01:48 +08:00
ldm0 c4465be52f fix(cdp): preserve buffered Audits issues during replay 2026-11-20 12:40:22 +08:00
ldm0 1a4eeee66e fix(network): preserve worker redirect transport observations
Retain each manually followed HTTP hop's request/response ExtraInfo and
derive redirect availability from observed exchanges instead of a fixed flag.
Keep wire ExtraInfo when interception changes the logical response, and
preserve buffered redirect metadata without announcing requests twice.

Cover Worker fetch/XHR through two 302 Set-Cookie hops, including synthetic
first-hop redirects that must not produce transport ExtraInfo.
2026-11-20 02:23:32 +08:00
ldm0 359c32095a refactor(network): separate request updates from transport observations 2026-11-20 02:23:32 +08:00
ldm0 a5c8897cc8 fix(network): keep prepared cookies out of CDP transport headers
Retain admission cookie metadata in the typed automation event for BiDi, while deferring CDP Cookie headers and ExtraInfo to observed transport data.

Verify a Service Worker supplied iframe script executes without an HTTP script request or invented CDP Cookie header, and keep the prepared metadata available to BiDi.
2026-11-20 02:23:32 +08:00
ldm0 87c9d92c94 fix(network): retain worker request metadata updates
Keep repeated native request snapshots in the output queue so Fetch overrides refresh captured upload bodies. Mark which snapshots announce a new request and suppress duplicate CDP starts during metadata enrichment.

Check that chained binary, text and empty upload overrides preserve a single requestWillBeSent per request and session.
2026-11-20 02:23:32 +08:00
ldm0 ffd465e6ff fix(network): include child script cookies in BiDi admission
Prepare initial headers and cookie metadata through the child Document's
request client, including credentials and browser site-context policy.
BiDi beforeRequestSent and terminal events retain this request metadata.

Defer CDP ExtraInfo separately so admission cookie metadata does not consume
the single later transport ExtraInfo event. Test HTTP 200, HTTP 404 and
cross-origin anonymous script requests.
2026-11-20 02:23:32 +08:00
ldm0 28213784f0 fix(network): retire announced child scripts with their documents
Use Document resource-load leases and shared cache consumer cancellation
for announced child parser scripts. Finish the original request on
retirement, ignore late callbacks, and publish completion independently
of parser-runner lifetime when navigation is cancelled.

Track request ExtraInfo publication separately from enriched cookie
metadata so HTTP-error responses preserve one Cookie ExtraInfo event.

Cover held-response retirement, cancelled srcdoc, late source callbacks,
and repeated metadata enrichment with regression tests.
2026-11-20 02:23:32 +08:00
ldm0 6256a6fa28 fix(network): announce child parser script requests before completion 2026-11-20 02:23:32 +08:00
ldm0 4edcd179ab refactor(target): remove legacy attachment workflow wrappers
Commit Browser detach and auto-attach disable synchronously, preserving event
ordering while supervising each native retirement independently. Remove the
synthetic completion objects, test-only serial runner, and obsolete recovery.

Batch script removal with SessionPageUpdates and retain the original disposal
identity for completion. Enqueue target-owned Inspector initialization without
claim/reply observers or a cancellable route. Share endpoint selection and
borrow connection keys/bindings separately from navigation restore snapshots.

Clarify session admission names and separate static policy from Page readiness
selection while retaining the admission token through synchronous redispatch.
Exercise the production Browser commit and supervisor paths in disposal tests.
2026-11-20 02:10:47 +08:00
ldm0 1a2d1015b4 fix(target): isolate native cleanup and Page subscription admission
Supervise each retired session independently so a busy Renderer cannot delay
another target's detach finalizer and successor connection. Preserve Browser
cascade publication and each session's cleanup-before-retirement ordering.

Apply Page subscriptions at command admission and defer only their initial
Document work. Resume without replaying an obsolete enable or chooser setting.
Remove the redundant cleanup owner and unreachable connection replacement.

Cover Primary lane reuse across auto-attach with a held peer, and Page
subscription changes while the initial installer remains pending.
2026-11-20 02:10:47 +08:00
ldm0 3cfec23af6 refactor(target): decouple Browser sessions from Renderer readiness
Commit Browser attachment and withdrawal independently of native Page and
Inspector initialization. Keep shared initial builds on the target and bind
queued Main/IO work to its admitted session connection and native agent.

Separate minimum Inspector connect from ordered binding replay, and publish
unobserved initialization facts without snapshots or completion fences.
Retire Browser contributions immediately and supervise cleanup using the
original native authority, including failed or replaced connections.
2026-11-20 02:10:47 +08:00
ldm0 1a08aa3454 fix(target): supervise deferred Inspector initialization 2026-11-20 02:10:47 +08:00
coolswood 5fe7478591 test(target): make the deferred attachment binding apply fixture test match fixture reality
The fixture renderer is not modal-blocked (the pushed dialog only
publishes connection-level state), so the deferred apply settles as
soon as its dispatch runs instead of staying parked behind a live
modal: the completion arrives as success and finishes cleanly. Assert
that, and cover the scheduler warn-path contract by injecting a
failure directly into the completion. Renderer death while the apply
is parked behind a production modal stays covered by the websocket
integration test.
2026-11-20 02:10:47 +08:00
coolswood f3504965ab fix(target): complete Target.attachToTarget while a JavaScript dialog is open
Chromium resolves Target.attachToTarget in ~0 ms even when the target
shows a modal alert/confirm/prompt; moli parked the attach response
behind the renderer's modal wait because the attachment binding apply
was awaited before the commit.

Defer the binding apply instead: a dialog that is already published for
the target (or one that opens while the apply waits) hands the
still-queued dispatch to a supervised background wait, and the attach
commits immediately. The apply settles once the renderer frees up and
its completion is consumed by the scheduler with the same failure
tolerance as the synchronous path, minus the response predecessor
fence that no longer orders anything after publication. Renderer FIFO
still keeps the new session's first command behind the bindings.

createTarget/setAutoAttach share the broader dispatch path and remain
follow-up work.
2026-11-20 02:10:47 +08:00
ldm0 14274ee14a build: update Rust toolchain to 1.100.0
Use matching Bookworm images for CI and release builds. Address the compiler deprecations and Clippy diagnostics introduced by Rust 1.100.0.
2026-11-19 05:56:01 +08:00
ldm0 8d08a55d45 test(fetch): finish unmatched navigation before checking the next pause
Extracted from wpt-misc-fix commit 58bff5149b.
2026-11-19 05:36:54 +08:00
ldm0 2f17076c80 test(fetch): settle initial document before preload interception
Extracted from wpt-misc-fix commit bd4cd0ddb98436fb6253e845cc6fb3ea91dbf6e3.
2026-11-18 19:11:45 +08:00
ldm0 2206f32f40 refactor(devtools): isolate optional runtime modules 2026-11-18 19:09:35 +08:00
ldm0 3ce8ad6cd8 feat(devtools): make external renderer automation optional 2026-11-18 19:09:35 +08:00
ldm0 b9c2aa67c9 refactor(cookies): reuse navigation context for CDP reports 2026-11-18 17:32:19 +08:00
ldm0 6066b6c9c3 refactor(protocol): resolve resource state once per target 2026-11-18 16:53:15 +08:00
ldm0 dc61300081 fix(protocol): bound retained navigation stack usage
Place the large navigation state machine on the heap before retained command workflows poll it. This bounds the production navigation stack while preserving the original cancellation, reply-boundary and retained-result behavior under the default Rust thread stack.
2026-11-18 15:55:18 +08:00
ldm0 c45da1adf5 fix(cdp): release Worker Network cursors on disable 2026-11-18 14:25:57 +08:00
ldm0 e2ce469daa fix(worker): publish WebSocket events on worker targets 2026-11-18 14:25:57 +08:00
ldm0 cdb0190538 fix(worker): preserve web-security policy through native loading
Retain the native Worker loading pipeline from main and apply the instance policy and execution origin to streamed and buffered Fetch/XHR responses. Observe Network completion on the actual Worker session in policy regression tests.
2026-11-18 00:10:43 +08:00
ldm0 5ff0e8167d fix(network): complete web-security resource and worker semantics 2026-11-18 00:10:43 +08:00
ldm0 5d222fe043 feat(browser): align disabled web security with Chromium instance policy 2026-11-18 00:10:43 +08:00
ldm0 d70d2e8e4a refactor(cdp): consolidate asynchronous file input preparation 2026-11-16 19:42:47 +08:00
ldm0 51bd0116c2 refactor(files): make selected file read policies explicit 2026-11-16 19:42:47 +08:00
ldm0 cb95f73c17 refactor(files): move upload regressions into a test module 2026-11-16 19:42:47 +08:00
ldm0 602a57872e fix(files): check selected snapshots before opening 2026-11-16 19:42:47 +08:00
ldm0 0b0d65298f fix(files): recheck directory upload paths for symlink replacements
Resolve the selected root once and recheck path components before queued traversal, backing creation and lazy reads. Preserve the chosen root name and explicit file selection behavior. These are best-effort pathname checks; check/open races and file identity replacement remain outside this change.
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 084b68c2ef fix(files): normalize directory paths and cover CDP upload boundaries 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 ed9ad079c2 refactor(worker): own fetch and XHR loading natively
Give each load a stable native network handle and single-use interception ports. Keep Worker Promise settlement separate from network completion, route observations to Worker targets, and remove the parent request table and continuation messages.

Cover cancellation, streaming, request overrides, authentication, CSP and Service Worker responses. Keep the bucket-deletion test transaction active until retirement instead of racing its normal auto-commit.
2026-11-16 15:23:35 +08:00
ldm0 190d51d653 fix(worker): retain intercepted requests until completion 2026-11-16 15:23:35 +08:00
ldm0 715e26ed6f fix(worker): settle intercepted redirects before network completion 2026-11-16 15:23:35 +08:00
ldm0 5972b95383 fix(fetch): check CORS before intercepted redirect errors 2026-11-16 15:23:35 +08:00
ldm0 c053c08137 fix(fetch): honor redirect modes without a Location header 2026-11-16 15:23:35 +08:00
ldm0 89bf5ae412 fix(input): checkpoint native keyboard callbacks 2026-11-16 14:27:19 +08:00
Donough Liu 76dfcbcaac fix(downloads): stream retained and authorized Blob downloads (#2968)
Retain immutable Blob backing after authorizing the initiating Document storage key and partition. Stream bounded chunks through the existing download artifact lifecycle and report unavailable local Blob URLs as canceled downloads.

Include the Playwright callback regression from #2970, large Blob transport and artifact checks, permission isolation, read-error cleanup and cancellation coverage.

Consolidates #2970.
Fixes #2932.
2026-11-15 23:11:50 +08:00
ldm0 1a752c0181 fix(webdriver): preserve raw key locations in actions 2026-11-15 16:56:15 +08:00
ldm0 6d5e8580b0 fix(input): preserve keyboard event location through dispatch 2026-11-15 16:56:15 +08:00
ldm0 d8fe34fe93 fix(xhr): share intercepted request header handling 2026-11-15 15:02:05 +08:00
ldm0 bab1209c75 test(fetch): guard fulfilled redirects with exact interception patterns
Refs #2931
2026-11-15 14:52:03 +08:00
ldm0 7ca5ce7d4b refactor(types): group fetch and page types under moli-types 2026-11-15 14:41:50 +08:00
ldm0 fa87b9515b fix(fetch): preserve stylesheet cache and Network semantics 2026-11-15 05:38:22 +08:00