Commit Graph

51 Commits (acd8966ff054511b541ab1020377055b2694de09)

Author SHA1 Message Date
Peter Steinberger 605f48556b
refactor(browser): share lifecycle cleanup helpers 8 months ago
Peter Steinberger bec891b2e2 test: cover attach-only browser stop cleanup (#60097) (thanks @pedh) 8 months ago
pedh 2c9723afd5 fix(browser): disconnect Playwright CDP session on stop for attachOnly/remote profiles
When `browser stop` is called for an `attachOnly` or remote CDP
profile, `profileState.running` is null (no process was launched), so
`stopRunningBrowser()` returned early without closing the Playwright
CDP connection. This left emulation overrides (prefers-color-scheme,
viewport, etc.) permanently applied until a full gateway restart.

Now call `closePlaywrightBrowserConnectionForProfile()` before
returning for attachOnly and remote CDP profiles, matching the cleanup
behavior already present in `resetProfile()`. Regular profiles that
were never started still return `{ stopped: false }`.

Fixes #60095
8 months ago
Matt Van Horn b22f6257f0 fix(browser): remove fromSurface: false for Chrome 146+ screenshot compat 8 months ago
Agustin Rivera 5da360cada fix(browser): trim validation error prefix 8 months ago
Agustin Rivera aefc6fc161 fix(browser): validate profile cdp urls 8 months ago
Peter Steinberger bc356cc8c2 fix: harden direct CDP websocket validation (#60469) (thanks @eleqtrizit) 8 months ago
Agustin Rivera c3f8427973 fix(browser): validate initial cdp endpoints 8 months ago
Agustin Rivera 80720b4994 fix(browser): validate cdp websocket pivots 8 months ago
Vincent Koc 88d3b73c6d fix(types): annotate portable exported helper types 8 months ago
Peter Steinberger 13bc70397a
test: trim test partial mocks 8 months ago
Peter Steinberger 636a23b73e
test: extract node builtin mock helpers 8 months ago
Peter Steinberger e0580e6863
test: harden shared-worker runtime setup 8 months ago
Vincent Koc 745f1c9812 fix(types): align callers with removed legacy config aliases 8 months ago
Shakker 4528f8779e test: localize browser config env helper 8 months ago
Shakker a5b23f17fb perf: split browser config sdk support 8 months ago
Vincent Koc 9bd05d3841 test(browser): stop reloading auth server module 8 months ago
Vincent Koc d21d859ded test(browser): stop reloading cdp screenshot module 8 months ago
Vincent Koc 9a53c3d772 test(browser): drop redundant module resets 8 months ago
Vincent Koc 5021b12ac1 perf(browser): trim invoke-browser test imports 8 months ago
Vincent Koc fac89d403b perf(browser): split remote profile tab op tests 8 months ago
Vincent Koc c0a8d07fce test(browser): collapse wrapper suite files 8 months ago
Vincent Koc 2bfbddb81f perf(browser): remove duplicate heavy test wrappers 8 months ago
Peter Steinberger 9bba2ec0ad
test: trim extension teardown churn 8 months ago
Peter Steinberger 847faa3d04
test: trim extension test import churn 8 months ago
pgondhi987 462b4020bc
fix(browser): block SSRF redirect bypass via real-time route interception (#58771)
Install a Playwright route handler before `page.goto()` so navigations
to private/internal IPs are intercepted and aborted mid-redirect instead
of being checked post-hoc after the request already reached the internal
host. Blocked targets are permanently marked and rejected for subsequent
tool calls.

Thanks @pgondhi987
8 months ago
mappel-nv 9c22d63669
Browser: normalize localhost absolute-form CDP hosts (#59236)
* Browser: normalize localhost absolute-form CDP hosts

* CHANGELOG: note localhost absolute-form CDP fix

---------

Co-authored-by: Jacob Tomlinson <jtomlinson@nvidia.com>
8 months ago
Vincent Koc cb7c0e24d0 perf(test): trim more browser reload churn 8 months ago
Vincent Koc dd5bf6b1d0 perf(test): cut more hotspot reload churn 8 months ago
Vincent Koc 7a7549f12f
perf(test): reduce hotspot reload churn (#59033) 8 months ago
Han Yang 68ee3113a9
Fix: CDP profiles prefer cdpPort over stale WebSocket cdpUrl (Resolves #58494) (#58499)
* fix(browser): prefer cdpPort over stale WebSocket cdpUrl for attach-only profiles

* fix(browser): preserve profile host when dropping stale devtools WS path
8 months ago
FMLS 44caf1ee3d
fix(browser): prevent cross-origin images from disappearing in CDP screenshots (#54358)
fromSurface: true + captureBeyondViewport: true triggers a Chromium compositor
bug where cross-origin image textures are lost when extending the capture
surface. Switch to fromSurface: false to use the software rendering path.

For full-page captures, temporarily expand the viewport via
Emulation.setDeviceMetricsOverride, preserving the current mobile/DPR/screen
state during capture and restoring it afterward so pre-existing device
emulation is not lost.

Made-with: Cursor

Co-authored-by: hakunaliu <hakunaliu@tencent.com>
8 months ago
Shakker ab0af5997d test: isolate browser snapshot navigation from proxy env 8 months ago
Shakker e8b0d57eb6 test: isolate browser navigation tests from host proxy env 8 months ago
Peter Steinberger 1efef8205c
fix: stabilize extensions surface test gate 8 months ago
Peter Steinberger 8861cdbb6f
refactor(plugin-sdk): untangle extension test seams 8 months ago
Peter Steinberger 232a96a0dc test(browser): spy tmp-dir seam in pw download test 8 months ago
Peter Steinberger 25a988c211 fix(ci): narrow browser config refresh seam 8 months ago
Peter Steinberger 36b9ec9418 fix(ci): narrow browser logger and schema seams 8 months ago
Peter Steinberger 4f0ad16a00 fix(ci): route browser tmp path through public temp-path seam 8 months ago
Peter Steinberger 6fec75f15d test(browser): isolate auth and download mocks 8 months ago
Peter Steinberger c720fa83bb fix(browser): narrow browser support facades 8 months ago
Peter Steinberger 65ad45a37f test(browser): stabilize cli runtime seams 8 months ago
Peter Steinberger 6e107b8857
fix(runtime): stabilize provider and channel runtime tests 8 months ago
Anmol Ahuja c40884d306
Prefer non-user writeable paths (#54346)
* infra: trust system binary roots

* infra: isolate windows install root overrides

* infra: narrow windows reg lookup

* browser: restore windows executable comments

---------

Co-authored-by: Jacob Tomlinson <jtomlinson@nvidia.com>
8 months ago
Peter Steinberger 0ef2a9c8b5 refactor: remove core browser test duplicates 8 months ago
Peter Steinberger 9a7ceceffa refactor: move browser tests into plugin 8 months ago
Peter Steinberger d72115c9df
refactor: genericize speech provider config surface 8 months ago
Peter Steinberger 83ca6fbfc6 refactor: finish browser compat untangle 8 months ago
Peter Steinberger 8eeb7f0829 refactor: switch browser ownership to bundled plugin 8 months ago