Karl Seguin
431db85ecb
Merge pull request #978 from lightpanda-io/dynamic_cdp_read_buffer
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Make the CDP read buffer heap allocated & dynamic
2025-08-29 12:20:58 +08:00
Karl Seguin
1ebac06f4b
add debug line on cdp buffer growth
2025-08-29 10:55:36 +08:00
Karl Seguin
c7c5af4708
zig fmt
2025-08-29 10:51:19 +08:00
Karl Seguin
0b6a9d3a0b
use llvm. The new x86 backend crashes with v8.
2025-08-29 10:42:07 +08:00
Karl Seguin
23d6362058
fix telemetry, link libc and libcpp
2025-08-29 10:42:06 +08:00
Karl Seguin
1443f38e5f
Zig 0.15.1
...
Depends on https://github.com/lightpanda-io/zig-v8-fork/pull/89
2025-08-29 10:42:06 +08:00
Karl Seguin
94960cc842
Merge pull request #979 from lightpanda-io/app_owns_platform
...
App owns platform
2025-08-29 10:33:55 +08:00
Karl Seguin
efc983b009
Start with 16K buffer (down from 32K). Use array list growth algorithm
2025-08-29 10:33:27 +08:00
Karl Seguin
74d90f2892
fix tests
2025-08-29 10:14:59 +08:00
Karl Seguin
56f1b6cc19
Make the CDP read buffer heap allocated & dynamic
...
Rather than stack-allocating MAX_MESSAGE_SIZE upfront, we now allocate 32KB
and grow the buffer as needed for larger messages, up to MAX_MESSAGE_SIZE.
This will reduce memory usage for drivers that don't send huge payloads (like
playwright does).
While not implemented, this would also enable us to set the MAX_MESSAGE_SIZE
at runtime (e.g. via a command line option).
2025-08-29 10:14:58 +08:00
Karl Seguin
fa2cd9dfd9
Ability to start/stop CDP server.
...
Exists for cleaning up after tests.
2025-08-29 10:14:08 +08:00
Karl Seguin
687f09d952
Make the App own the Platform
...
Removes optional platform, which only existed for tests.
There is now a global `@import("testing.zig").test_app` available. This is setup
when the test runner starts, and cleaned up at the end of tests. Individual
tests don't have to worry about creating app, which I assume was the reason I
Platform optional, since that woul dhave been something else that needed to be
setup.
2025-08-29 10:14:06 +08:00
Karl Seguin
67b479b5c8
Merge pull request #983 from lightpanda-io/sigint
...
exit the browser on SIGINT signal
2025-08-29 10:10:49 +08:00
Pierre Tachoire
eac2140693
Merge pull request #986 from lightpanda-io/readme-interception
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
README: check request interception
2025-08-28 17:19:32 +02:00
Pierre Tachoire
7a3f5de9c2
Merge pull request #985 from lightpanda-io/fulfill-content-type-len
...
http: set content_type len on fulfill request
2025-08-28 17:19:23 +02:00
Pierre Tachoire
7005bf2481
README: check request interception
2025-08-28 17:18:42 +02:00
Pierre Tachoire
b80ee3342c
http: set content_type len on fulfill request
2025-08-28 16:28:41 +02:00
Pierre Tachoire
4c7b7b1e60
handle graceful shutdown
2025-08-28 12:44:16 +02:00
Pierre Tachoire
1a4a3608c8
exit the browser on SIGINT signal
2025-08-28 12:44:12 +02:00
Pierre Tachoire
6800d50339
Merge pull request #981 from lightpanda-io/page-navigate-event
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
page: ensure page navigate events order
2025-08-27 18:23:22 +02:00
Pierre Tachoire
036f808ec6
page: ensure page navigate events order
2025-08-27 17:36:36 +02:00
Pierre Tachoire
7647ce9e6d
Merge pull request #960 from lightpanda-io/auth-challenge
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
auth required interception
2025-08-27 15:34:51 +02:00
Karl Seguin
545d3f81ce
Merge pull request #977 from lightpanda-io/selector_by_ref
...
Select is relatively large (64 bytes), pass it by ref
2025-08-27 19:37:36 +08:00
Pierre Tachoire
455615b9c1
Merge pull request #980 from lightpanda-io/update-docker-readme
...
Update docker readme
2025-08-27 09:32:41 +02:00
Pierre Tachoire
d0e2a03da5
README: proxy support is ready
2025-08-27 09:30:43 +02:00
Pierre Tachoire
fa408e644c
cs fix
2025-08-27 09:26:10 +02:00
Pierre Tachoire
a22416584d
README: --privileged is not needed anymore
2025-08-27 09:25:51 +02:00
Karl Seguin
b8fc60df45
Merge pull request #975 from lightpanda-io/dynamic_script
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Support dynamic scripts which are added to the DOM before src is set
2025-08-27 05:59:28 +08:00
Karl Seguin
c6455cf02e
Select is relatively large (64 bytes), pass it by ref
2025-08-27 05:55:04 +08:00
Pierre Tachoire
2ac1d39367
Merge pull request #976 from lightpanda-io/webapi_file_placeholder
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
The most basic File implementation.
2025-08-26 18:20:53 +02:00
Pierre Tachoire
041e014d68
Merge pull request #970 from lightpanda-io/remove_loop
...
Remove the loop
2025-08-26 18:17:32 +02:00
Pierre Tachoire
5defb5c442
http: build headers when auth challenge fails
2025-08-26 18:05:45 +02:00
Pierre Tachoire
520a572bb4
http: add reset and tries for transfer
2025-08-26 18:05:45 +02:00
Pierre Tachoire
4c602256da
http: remove useless field
2025-08-26 18:05:45 +02:00
Pierre Tachoire
5a40cbd655
cdp: use enum for AuthChallengeResponse
2025-08-26 18:05:45 +02:00
Pierre Tachoire
a75f9dd48d
cdp: set default username/passwd for authChallengeResponse
2025-08-26 18:05:44 +02:00
Pierre Tachoire
6b47aa2446
cdp: add auth required interception process
2025-08-26 18:05:44 +02:00
Pierre Tachoire
a847a1faae
http: replace _forbidden with _auth_challenge struct
2025-08-26 18:05:44 +02:00
Pierre Tachoire
bb381e522c
http: add creds into request
2025-08-26 18:05:39 +02:00
Karl Seguin
6962cfb91a
Merge pull request #973 from lightpanda-io/no-body-response
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Handle response without body
2025-08-26 18:44:22 +08:00
Pierre Tachoire
302c50a90e
Merge pull request #964 from lightpanda-io/proxy-header
...
http: refacto headerCallback and get proxy CONNECT request details
2025-08-26 10:53:43 +02:00
sjorsdonkers
e2d47e1c86
fix merge conflict
2025-08-26 10:12:07 +02:00
Pierre Tachoire
7d51da1efb
Merge pull request #974 from lightpanda-io/ignore_non_js_script_tags
...
Removes the log for unknown script tags
2025-08-26 08:53:29 +02:00
Karl Seguin
c7674926c3
The most basic File implementation.
...
Almost silly as-is, but handles this case:
```
if (input instanceof File) {
throw Error('file not supported')
}
```
as seen on reddit.
2025-08-26 13:25:30 +08:00
Karl Seguin
f0ca9728ae
Support dynamic scripts which are added to the DOM before src is set
...
This should load the "src.js":
```
const s = document.createElement('script');
document.getElementsByTagName('body')[0].appendChild(s);
s.src = "src.js"
```
Notice that src is set AFTER the element is added to the DOM. This PR enables
the above, by
1 - skipping dynamically added scripts which don't have a src
2 - trying to load a script whenever `set_src` is called.
(2) is safe because the ScriptManager already prevents scripts from being
processed multiple times.
Additionally, not only can the src be set after the script is added to the DOM,
but onload and onerror can be set after the src:
```
s.src = "src.js"
s.onload = ...;
s.onerror = ...;
```
This PR also delays reading the onload/onerror callbacks until the script is
done loading.
This behavior is seen on reddit.
2025-08-26 13:10:55 +08:00
Karl Seguin
5fa8567801
Removes the log for unknown script tags
...
Some sites have a lot of text/template or application/json, and it just adds
noise to the logs.
2025-08-26 08:48:29 +08:00
sjorsdonkers
e5b1acb6e1
Handle response without body
2025-08-25 18:07:02 +02:00
Karl Seguin
8fdbaef4c7
Use posix.TCP.NODELAY now that it's available in MacOS also
2025-08-25 22:03:58 +08:00
Pierre Tachoire
7869159657
add e2e test through proxy
2025-08-25 14:18:15 +02:00
Pierre Tachoire
7046e18d7e
http: simplify header parsing
2025-08-25 14:18:14 +02:00