Commit graph

43 commits

Author SHA1 Message Date
Dmitry Gozman e726c18788
chore: use 'mime' for various mimeType-extension mappings (#8426) 2021-08-25 11:18:35 -07:00
Dmitry Gozman 29eb6cb777
chore: migrate tracing to har (#8417)
chore: migrate tracing to har

- `HarTracer` is used by both `HarRecorder` that implements
  `recordHar` context option, and by tracing.
- We keep the `trace.network` format for now, so it is not
  yet a valid har file, but it contains har entries.
2021-08-24 21:09:41 -07:00
Dmitry Gozman b188468fa4
fix(tracing): rewrite blob urls so that we can intercept them (#8423) 2021-08-24 17:05:26 -07:00
Dmitry Gozman b0a7843247
chore: migrate tracing ResourceSnapshot to follow har entry format (#8391)
This will ease the migration of tracing to har.
2021-08-24 13:17:58 -07:00
Dmitry Gozman 99993e173b
fix(snapshots): account for malformed headers (#8241)
When browser receives multiple header values for the same header name,
we present them as LF-separated value. This is not considered valid in
Node, so we should split by LF when serving a snapshot.

There more invalid characters in headers, so just in case we try/catch it.
2021-08-16 17:40:46 -07:00
Pavel Feldman 21b510c6e7
chore(tracing): remove resource id (#8131) 2021-08-10 21:23:31 -07:00
Pavel Feldman 76150f1bcb
chore(tracing): remove proactive snapshotSizes caching (#8126) 2021-08-10 17:06:14 -07:00
Pavel Feldman a9e1916672
chore(tracing): do not produce cached resources maps (#8110) 2021-08-10 12:08:19 -07:00
Pavel Feldman 8eac1e96d3
chore: add extensions to the trace resources (#8105) 2021-08-09 16:36:24 -07:00
Dmitry Gozman 73b7230931
fix(trace viewer): render snapshots with correct viewport size (#8020) 2021-08-05 16:04:09 -07:00
Dmitry Gozman 9ab60f66bf
feat(tracing): allow calling tracing.start multiple times (#7992)
Subsequent invocations reset the trace. This removes the `tracing._reset` method.

Also fixed a bug where BASE element was not reset properly.
Also fixed a bug where tracing would affect the result of protocol call
by setting `callMetadata.error` property.
2021-08-04 21:11:35 -07:00
Dmitry Gozman 3e05d8e9fa
feat(tracing): introduce _reset() and _export() (#7974)
`tracing._export({ path })` exports current tracing state into a file
and does not require tracing to be stopped.

`tracing._reset()` resets current tracing state, but keeps resources
around so they can be referenced in the future snapshots. Does not stop.

The usage pattern is:
```js
await tracing.start({ screenshots: true, snapshots: true });
// ...
await tracing._reset();
// Do stuff, it will all be in the export below.
await tracing._export({ path });
// ...
await tracing.stop();
```
2021-08-03 16:08:06 -07:00
Dmitry Gozman c406b23387
feat(tracing): do not store scripts in trace (#7970)
We do not need them for snapshots.
2021-08-03 13:05:58 -07:00
Max Schmitt 08da9d207e
chore: move processLauncher into src/utils (#7504) 2021-07-07 21:14:16 +02:00
Dmitry Gozman fc0b8ad3f0
fix(tracing): record scroll position for all scrolled elements (#7388) 2021-06-29 16:20:15 -07:00
Pavel Feldman 7062278265
fix(trace): copy cached resources on write (optimization) (#7372) 2021-06-28 22:01:08 -07:00
Pavel Feldman 02538fb587
fix(trace): account for last child node removal (#7332) 2021-06-25 18:52:36 -07:00
Max Schmitt 103f8ddd06
Revert "chore: update eslint config (#6840)" partly (#7268)
This reverts commit ec7d37d92f.
2021-06-23 11:08:35 +02:00
Joel Einbinder 10a82f862c
fix(snapshotter): support constructed CSSStyleSheet
Fixes #7085
2021-06-17 09:41:29 -07:00
Pavel Feldman 19d69b792d
fix(tracing): do not merge srcset urls (#6995)
Fixes #6982
2021-06-09 12:05:21 -07:00
Dmitry Gozman a83646684a
fix(tracing): error handling (#6888)
- Reject when ZipFile signals an error.
- Make sure snapshotter does not save trace events after stop().
- Await pending blob writes on stop().
2021-06-04 14:52:16 -07:00
Pavel Feldman d7c6720ce7
chore: include context options into the trace (#6572) 2021-05-13 22:36:34 -07:00
Pavel Feldman 0678f48289
chore(tracing): trim network urls for readability (#6566) 2021-05-13 16:07:38 -07:00
Dmitry Gozman fbae295ce2
fix(har): save popup's main request/response (#6562)
This migrates server side code from networks events on the Page
to network events on the BrowserContext.
2021-05-13 15:02:10 -07:00
Pavel Feldman 21cb726b7d
chore(tracing): expose tracing api (#6523) 2021-05-12 12:21:54 -07:00
Pavel Feldman a9523d9d8f
feat(ff): roll to 1256/1246 (#6466) 2021-05-08 11:35:36 -07:00
Pavel Feldman 934bc672f7
test(tracing): start adding tracing tests (#6369) 2021-04-30 07:40:22 -07:00
Pavel Feldman 434f474ce8
chore(evaluate): implement non-stalling evaluate (#6354) 2021-04-29 09:28:19 -07:00
Pavel Feldman 922d9ce1fb
chore(tracing): fix some of the start/stop scenarios (#6337) 2021-04-27 11:07:07 -07:00
Pavel Feldman be27f47309
feat(tracing): introduce context.tracing, allow exporting trace (#6313) 2021-04-24 20:39:48 -07:00
Pavel Feldman a9219aa8b6
chore: start / stop context tracing (#6309) 2021-04-23 20:39:09 -07:00
Pavel Feldman 85e2db2416
chore: push dispatcher guid into object, reuse it in trace (#6250) 2021-04-20 23:03:56 -07:00
Pavel Feldman e6f5ce9044
chore: allow running multiple snapshotters for tests (#6147) 2021-04-08 17:27:55 -07:00
Pavel Feldman d9546fd098
chore: read all traces from the folder (#6134) 2021-04-08 07:59:05 -07:00
Pavel Feldman d0db4f6737
feat: include screencast in trace (#6128) 2021-04-07 14:32:12 -07:00
Pavel Feldman 7011e5737a
chore(evaluate): explicitly annotate methods that wait for signals (#5859) 2021-03-17 10:47:07 -07:00
Pavel Feldman ad69b2af83
chore: unify recorder & tracer uis (#5791) 2021-03-11 11:22:59 -08:00
Pavel Feldman fea6669473
feat(trace): highlight action target (#5776) 2021-03-10 11:43:26 -08:00
Pavel Feldman 1a94ea5f6c
chore: refactor trace viewer to reuse snapshot storage (#5756) 2021-03-08 19:49:57 -08:00
Pavel Feldman b253ee80c0
chore(snapshot): brush up, start adding tests (#5646) 2021-03-01 12:20:04 -08:00
Pavel Feldman aeb2b2f605
feat(inspector): wire snapshots to inspector (#5628) 2021-02-26 14:16:32 -08:00
Pavel Feldman 992f808210
chore(snapshot): implement in-memory snapshot (#5624) 2021-02-25 13:09:26 -08:00
Pavel Feldman 2ff6d54f26
chore: extract snapshotter from trace viewer (#5618) 2021-02-25 09:33:32 -08:00