Commit graph

107 commits

Author SHA1 Message Date
Yury Semikhatsky 587682e024
feat(chromium): bump to r865012 (#5963)
References #5858

Co-authored-by: Andrey Lushnikov <lushnikov@chromium.org>
2021-03-31 09:51:18 -07:00
Dmitry Gozman 98f1f715c5
chore: ensure we emit Page event before resoliving pageOrError (#6012)
Internal callers of pageOrError should be able to rely on the
Page being already reported.
2021-03-30 17:35:42 -07:00
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
E 095ad6339c
chore: update error message when using userDataDir arg (#5814) 2021-03-15 16:58:46 -07:00
Joel Einbinder defd1a33be
fix(chromium): fix crash if connecting to a browser with a serviceworker (#5803) 2021-03-15 09:50:17 -07:00
Pavel Feldman 1dd6bd3316
infra(channel): wire release channel to all tests (#5820) 2021-03-15 08:07:57 -07:00
Pavel Feldman a96d6a7dbb
feat: allow to pick stable channel (#5817) 2021-03-13 14:02:39 -08:00
Pavel Feldman fea6669473
feat(trace): highlight action target (#5776) 2021-03-10 11:43:26 -08:00
Dmitry Gozman b3561e6c41
feat(chromium): bump to 857950 (#5742) 2021-03-05 18:09:38 -08:00
Dmitry Gozman ff243f1af5
fix(addInitScript): make it work on new pages without navigations (#5675) 2021-03-02 16:03:48 -08:00
Andrey Lushnikov eb9c8ce20c
feat(chromium): roll Chromium to Dev @ Feb 19, 2021 (#5536) 2021-02-22 11:17:55 -08:00
Andrey Lushnikov b6bd7c0d6a
feat(chromium): roll Chromium to r851527 (#5434)
Fixes #5197
2021-02-16 14:21:47 -08:00
Pavel Feldman 0c7da44465
test(inspector): add some tests (#5461) 2021-02-15 08:32:13 -08:00
Pavel Feldman 449adfd3ae
chore(recorder): move recording output into the gui app (#5425) 2021-02-11 17:46:54 -08:00
Andrey Lushnikov 6113d4d50d
feat(chromium): roll Chromium to r846621 (#5413) 2021-02-11 07:43:43 -08:00
Joel Einbinder d8f637c239
chore(typescript): enable esModuleInterop (#5409) 2021-02-11 06:36:15 -08:00
Joel Einbinder dca70abbd3
feat(chromium): connect to a browser over cdp (#5207) 2021-02-10 14:00:02 -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
Pavel Feldman 6680713e84
chore: don't reuse recorder app profile (#5365) 2021-02-08 16:02:23 -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
Dmitry Gozman d8e0834562
fix(server): use setMaxListeners(0) on all internal event emitters (#5283) 2021-02-03 13:53:09 -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 1a464c732c
feat(video): switch vp8 in ffmpeg to realtime (#5260)
This switches vp8 to "realtime" mode that works fast, adapting to
the speed of incoming frames, and produces the best quality in can
given realtime constraints.

In practice, this gives 2x larger video files but no noticible quality
difference. It also eliminates huge delays for encoding the video.

Drive-by: document our ffmpeg option choices and add some links
to documentation for future use.
2021-02-02 17:14:39 -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 1db5ef24a8
docs: document electron api (#5229) 2021-02-01 11:43:26 -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 beed9a79a3
feat(chromium): bump to 845618 (#5138) 2021-01-25 07:45:21 -08:00
Dmitry Gozman 0a7b917ee3
feat(chromium): bump to 844399 (#5044) 2021-01-17 17:28:06 -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
Pavel Feldman 97be66b15c
fix(adb): enable newPage in mobile browser (#4728) 2020-12-15 15:14:16 -08:00
Dmitry Gozman 495085cbb2
fix(chromium): make interception work with dedicated workers (#4658) 2020-12-10 15:04:57 -08:00
Dmitry Gozman be16ce4bd2
feat(errors): append recent browser logs when browser disconnects (#4625) 2020-12-08 09:35:28 -08:00
Joel Einbinder ea833daa89
chore: fix internal binding (#4598) 2020-12-08 08:38:29 -08:00
Dmitry Gozman c36f5fa33a
feat(chromium): roll to 833159 (#4626) 2020-12-07 15:55:22 -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
Pavel Feldman a0587949a5
feat(chromium): roll to r828656 (#4503) 2020-11-20 08:10:27 -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
Yury Semikhatsky dfe3552b59
feat(route): support URL overrides in continue (#4438) 2020-11-16 09:59:00 -08:00