Commit graph

47 commits

Author SHA1 Message Date
Pavel Feldman f1c0d09765
feat(size): emulate window.screen size (#5967) 2021-03-29 14:10:58 -07:00
Dmitry Gozman 6b3f4cd12b
chore: calculate video size in a single place (#5942) 2021-03-24 10:56:20 -07:00
Dmitry Gozman 8e97607389
fix(viedo): do not stall video in popups (#5941)
There are two problems, exposed by existing tests:

- We do not send Page.startScreeencast before Runtime.runIfWaitingForDebugger
  because we launch video recorder in between. This stalls when the page is busy
  immediately after resuming, e.g. with alert().
  Fixed by starting video recorder in advance.

- We wait for the first frame that may not come - for example, context-wide interception
  is blocking essential resource and first frame.
  Fixed by only waiting for the first frame before reporting the video, not the page.
2021-03-24 09:36:46 -07:00
Yury Semikhatsky 67c29e8155
chore: add missing await to floating promises (#5813) 2021-03-22 09:59:39 -07:00
Pavel Feldman 2367039a2c
chore(stable): throw user-friendly message when ffmpeg is missing (#5865) 2021-03-17 19:19:44 -07:00
Pavel Feldman 7011e5737a
chore(evaluate): explicitly annotate methods that wait for signals (#5859) 2021-03-17 10:47:07 -07:00
Dmitry Gozman ff243f1af5
fix(addInitScript): make it work on new pages without navigations (#5675) 2021-03-02 16:03:48 -08:00
Joel Einbinder d8f637c239
chore(typescript): enable esModuleInterop (#5409) 2021-02-11 06:36:15 -08:00
Pavel Feldman 2e01fbdbec
chore: introduce instrumentation api (#5385) 2021-02-09 14:44:48 -08:00
Pavel Feldman 0652f3251f
chore: introduce sdk object base class (#5370) 2021-02-09 09:00:00 -08:00
Andrey Lushnikov d499cf08d1
refactor: remove browserPaths in favor of Registry class (#5318)
This patch introduces a new Registry class that incapsulates
all logic regarding browsers and their paths.

Fixes #5278
2021-02-08 16:02:49 -08:00
Dmitry Gozman de30ee0aa8
fix(oopifs): account for various races between processes (#5320)
Consider the following situation (one among many possible).
- FrameA has an oopif child FrameB;
- FrameA navigates to same-process origin (e.g. about:blank);
- at the same time, FrameC is attached to the FrameB in the
  FrameB's process.

In this case, we get `frameNavigated` event for FrameA, immediately
followed by `frameAttached` event for FrameC. Since we detach all
FrameA's child frames on navigation, including the oopif FrameB,
there is no parent frame for FrameC to attach to.

In general, multiple processes coming from oopif may send their
events in wildly different order, and their view about the frame
tree may not always correspond to the "up to date" frame tree as
seen from the main frame's process. We try to keep our frame tree
aligned with what main process thinks, and ignore events that
reference frames absent in this tree.

Drive-by: handle filechooser exceptions because of async processing.
2021-02-05 11:30:44 -08:00
Andrey Lushnikov cb1b64289c
devops: downloading ffmpeg during install step (#5249)
This patch starts downloading FFMPEG like we download our browsers
instead of bundling it in the NPM package.

With this patch, NPM size is reduced from 8.8MB to 1.7MB.

Consequences:
- `npx playwright` is drastically faster now
- playwright driver for language bindings is way smaller
- projects that bundle Playwright can pass Apple Notorization

Fixes #5193
2021-02-03 09:19:11 -08:00
Dmitry Gozman 4cad34509f
fix(oopifs): do not emulate focus in oopifs (#5270)
- We don't need this, since it should propagate from the main frame.
- Forcing focus in oopif immediately focuses it and blurs currently
  focused frame. This leads to undesired side effects, e.g. selects
  being closed.
2021-02-03 08:47:52 -08:00
Dmitry Gozman 9e09bd369d
fix(oopifs): ignore target closure when broadcasting across oopifs (#5246) 2021-02-02 10:21:42 -08:00
Pavel Feldman bf8c30a88b
feat(ui): extract recorder sidebar into a window (#5223) 2021-01-31 16:37:13 -08:00
Pavel Feldman 975519150e
chore: centralize playwright creation, bind context listeners to instance (#5217) 2021-01-29 16:00:56 -08:00
Pavel Feldman 2e290be40b
chore: remove source maps in pwdebug mode (#5148) 2021-01-25 16:36:57 -08:00
Dmitry Gozman afaec552dd
feat(trace): show dialogs, navigations and misc events (#5025) 2021-01-15 18:30:55 -08:00
Yury Semikhatsky 0a2fe62cb7
fix(extensions): do not enable screencast for background pages (#4919) 2021-01-06 15:08:28 -08:00
Joel Einbinder ea833daa89
chore: fix internal binding (#4598) 2020-12-08 08:38:29 -08:00
Joel Einbinder 3624e3e315
chore: add internal method for utility context bindings (#4566)
* internal binding extracted from dnd patch

* refactor it into the page

* dgozman comments 1
2020-12-02 13:43:16 -08:00
Dmitry Gozman aea106b28e
chore: simplify server screencast code (#4501)
Currently, we always throw from FrameSession._stopScreencast
when not running with video, and immediately catch it in
CRPage.didClose (thanks to debugger to point that).

Overall, we have code prepared for start/stop API, which
we never did, so it makes sense to simplify code a bit,
and throw if something goes wrong.
2020-11-19 19:26:53 -08:00
Dmitry Gozman 38fadcaded
fix(chromium): use frameDetached reason (#4468)
This fixes the local -> remote frame swap when
Page.frameDetached arrives before Target.attachedToTarget.

Instead of error-prone logic we do currently, new CDP exposes
frame detach reason that we can use.
2020-11-17 10:24:13 -08:00
Pavel Feldman b0d174fd9a
revert: lifecycle refactoring, it breaks setContent (#4420) 2020-11-12 16:13:55 -08:00
Pavel Feldman 5d47214e2c
chore: register frameless listeners separately (#4407) 2020-11-12 13:44:38 -08:00
Pavel Feldman bd7507e133
chore: unify new page handling across vendors (#4411) 2020-11-12 12:41:23 -08:00
Yury Semikhatsky eee82a7fca
fix(oopif): store child frame id between frameDetached and attachedToTarget (#4410) 2020-11-12 09:51:17 -08:00
Pavel Feldman 28f6547d67
chore: add adb-based connectivity (#4375) 2020-11-06 16:31:11 -08:00
Dmitry Gozman 3db8b23b25
fix(chromium): lifecycle events race (#4369) 2020-11-06 13:37:15 -08:00
Dmitry Gozman 1c39689dd6
api(videos): introduce a single recordVideo option bag (#4309)
api(videos): introduce a single recordVideo option bag

Currently contains `dir` and `size`, previously known as
`videosPath` and `videoSize`.
2020-11-02 19:42:05 -08:00
Pavel Feldman 72320275ab
fix(headers): report raw request headers on Chromium (#4207) 2020-10-22 08:49:16 -07:00
Joel Einbinder 92dda698f8
feat: tap (#4097) 2020-10-19 10:07:33 -07:00
Pavel Feldman e9f5477d52
fix(screencast): await for the first video frame on Chromium (#4145) 2020-10-14 15:09:36 -07:00
Dmitry Gozman 4a77363af7
api: update videos api, hide tracing (#4015) 2020-10-01 11:06:19 -07:00
Dmitry Gozman df777344a3
api(video): simplify video api (#3924)
- This leaves just `recordVideos` and `videoSize` options on the context.
- Videos are saved to `artifactsPath`. We also save their ids to trace.
- `context.close()` waits for the processed videos.
2020-09-18 17:36:43 -07:00
Yury Semikhatsky 40323aa94d
fix(screencast): use viewport as default size (#3844) 2020-09-11 15:14:31 -07:00
Yury Semikhatsky af58c8acb2
fix(screencast): ensure that _videostarted is fired after newPage (#3807) 2020-09-08 17:01:00 -07:00
Andrey Lushnikov 143adc1634
refactor: bake ffmpeg into npm instead of CDN (#3799) 2020-09-08 15:10:36 -07:00
Yury Semikhatsky 66985fc5f6
feat(screencast): add expreimental public API on context (#3766) 2020-09-04 22:37:38 -07:00
Andrey Lushnikov bbe2233f08
feat(chromium): use bundled ffmpeg instead of npm deps (#3771)
Fixes #3680
2020-09-04 04:17:51 -07:00
Yury Semikhatsky 0976732ec6
fix(screencast): remove white padding in headless chromium (#3746) 2020-09-02 17:28:08 -07:00
Yury Semikhatsky db9b8a003f
fix(screencast): dont throw from frameAck if target is closed (#3702) 2020-08-31 17:43:23 -07:00
Yury Semikhatsky a17dd98cf9
feat(screencast): auto recording for new pages in chromium (#3701) 2020-08-31 15:21:02 -07:00
Yury Semikhatsky 8ec55e1fb2
feat(screencast): use ffmpeg to produce webm in chromium (#3668) 2020-08-31 08:43:14 -07:00
Dmitry Gozman cd220daa83
chore: move src files to server (#3593) 2020-08-24 06:51:51 -07:00
Dmitry Gozman f4e8f34c96
chore: move chromium to src/server/chromium, enfore installer deps (#3582) 2020-08-22 15:46:42 -07:00
Renamed from src/chromium/crPage.ts (Browse further)