Commit Graph

16 Commits

Author SHA1 Message Date
Karl Seguin
181f265de5 Rework Inspector usage
V8's inspector world is made up of 4 components: Inspector, Client, Channel and
Session. Currently, we treat all 4 components as a single unit which is tied to
the lifetime of CDP BrowserContext - or, loosely speaking, 1 "Inspector Unit"
per page / v8::Context.

According to https://web.archive.org/web/20210622022956/https://hyperandroid.com/2020/02/12/v8-inspector-from-an-embedder-standpoint/
and conversation with Gemini, it's more typical to have 1 inspector per isolate.
The general breakdown is the Inspector is the top-level manager, the Client is
our implementation which control how the Inspector works (its function we expose
that v8 calls into). These should be tied to the Isolate. Channels and Sessions
are more closely tied to Context, where the Channel is v8->zig and the Session
us zig->v8.

This PR does a few things
1 - It creates 1 Inspector and Client per Isolate (Env.js)
2 - It creates 1 Session/Channel per BrowserContext
3 - It merges v8::Session and v8::Channel into Inspector.Session
4 - It moves the Inspector instance directly into the Env
5 - BrowserContext interacts with the Inspector.Session, not the Inspector

4 is arguably unnecessary with respect to the main goal of this commit, but
the end-goal is to tighten the integration. Specifically, rather than CDP having
to inform the inspector that a context was created/destroyed, the Env which
manages Contexts directly (https://github.com/lightpanda-io/browser/pull/1432)
and which now has direct access to the Inspector, is now equipped to keep this
in sync.
2026-01-30 15:59:33 +08:00
Karl Seguin
412c881cd4 fix wpt and legacy_test runners 2026-01-19 07:28:56 +08:00
Karl Seguin
de4926d87d fix legacy runner, manual merge 2026-01-14 17:49:27 +08:00
Karl Seguin
0c23818470 Merge branch 'zigdom-history-fixes' into zigdom 2025-12-26 09:19:30 +08:00
Karl Seguin
9f3cb4349d more legacy test fixes 2025-12-25 09:08:01 +08:00
Karl Seguin
f266dbc171 remove unecessary task execution in legacy_tests 2025-12-25 07:35:02 +08:00
Muki Kiboigo
248ce4f1a8 add .skip.html to skip files in legacy tests 2025-12-24 09:04:33 -08:00
Muki Kiboigo
b3e6186c78 history tests pass without crash 2025-12-24 09:04:33 -08:00
Karl Seguin
a25fb4a8e4 re-enable crashing legacy tests 2025-12-24 18:41:44 +08:00
Karl Seguin
29efb467f0 Various input fixes (support for more attributes) based on legacy tests
AbortSignal.timeout function

LocalStorage named getter/setter
2025-12-24 18:36:46 +08:00
Pierre Tachoire
8fb1c3971c fix page.navigate into legacy_test and wpt 2025-12-22 15:39:46 +01:00
Karl Seguin
d9c53a3def Page.scheduleNavigation for location changes 2025-12-22 12:19:08 +08:00
Karl Seguin
1639ff1b98 improve XMLHTTPRequest. Legacy xhr.html pass 2025-12-15 17:56:23 +08:00
Muki Kiboigo
ac85341cab add NavigationKind to navigate 2025-12-09 17:10:59 -08:00
Karl Seguin
b8cc74f377 allow filtering legacy tests, fix location tests, improve URLSearchParams 2025-11-17 21:41:24 +08:00
Karl Seguin
7ab88e9a71 add legacy tests, optimize empty types 2025-11-14 15:55:02 +08:00