Commit Graph

2987 Commits

Author SHA1 Message Date
Andrey Lushnikov
868740067b
refactor: consolidate ffmpeg-related files in third_party/ffmpeg (#3815)
This patch:
- moves ffmpeg binaries from `//bin/` to `//third_party/ffmpeg`
- adds [COPYING.GPLv3](https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.GPLv3)
ffmpeg license
- changes npm packaging to include `//third_party/ffmpeg` only in `playwright` and `playwrihgt-chromium` a
2020-09-09 09:51:28 -07:00
Andrey Lushnikov
6c83266047
browser(firefox): force firefox devtools to open in a separate window (#3816)
References #3470
2020-09-09 09:36:32 -07:00
Yury Semikhatsky
dee739259e
feat(webkit): bump to 1343 (#3814) 2020-09-09 09:34:38 -07:00
Dmitry Gozman
5364c6acbc
browser(firefox): fix automatic http->https redirect (#3812)
browser(firefox): fix automatic http->https redirect

Sometimes, Firefox does an automatic http->https redirect without hitting
the network (e.g. for http://wikipedia.org). In this case, the http request
is very strange:
- it does not actually hit the network;
- it is never intercepted;
- we cannot access its response because there was no actual response.

So, we had a bug where:
- redirects inherited the original request's listener;
- that listener was throwing an error.
This lead to the error in the listeners onDataAvailable call chain,
and original listener that renders the response was never called,
resulting in an empty page.

This change:
- ignores the original request that did not hit the network;
- does not inherit the listener;
- adds try/catch around problematic calls.
2020-09-09 09:16:03 -07:00
Joel Einbinder
3c69f2a185
tes(types): use @ts-expect-error in tests where we check for errors (#3794) 2020-09-09 03:06:52 -07:00
Andrey Lushnikov
e8cf89572a
feat(chromium): roll Chromium to r799411 (#3811) 2020-09-09 00:58:25 -07:00
Joel Einbinder
1791be6d16
fix(input): send keypress event for enter key in chromium (#3796) 2020-09-08 20:04:14 -07:00
Pavel Feldman
b28ed214ca
chore: remove highlight from PWDEBUG in favor of devtools one (#3800) 2020-09-08 20:02:58 -07:00
Andrey Lushnikov
355ea73a0b
feat: actually bundle FFMPEG binaries with NPM packages (#3804)
This patch:
- adds FFMPEG binaries to the NPM packages
- adds a screencast test to make sure that screencast works. This currently relies on private screencast APIs.

NOTE: with this patch playwright package size grows from `650KB` to `4.2MB`.
2020-09-08 17:51:56 -07:00
Andrey Lushnikov
e9f48438ad
chore: use non-fractional revision for chromium revision (#3809)
Follow-up to 638c77c8e2
2020-09-08 17:28:16 -07:00
Andrey Lushnikov
b8d7f398b8
browser(chromium): mirror Chromium r799411 to Azure (#3808) 2020-09-08 17:19:14 -07:00
Andrey Lushnikov
638c77c8e2
devops: stop bundling FFMPEG with Chromium (#3806)
- This stops bundling FFMPEG with Chromium
- Stop supporting build numbers as fractional parts for Chromium
revisions
2020-09-08 17:05:21 -07:00
Yury Semikhatsky
af58c8acb2
fix(screencast): ensure that _videostarted is fired after newPage (#3807) 2020-09-08 17:01:00 -07:00
Yury Semikhatsky
a5a563659b
browser(webkit): fix basic screencast for accelerated compositing on win (#3803) 2020-09-08 16:00:51 -07:00
Yury Semikhatsky
8f81868b9c
fix(screencast): tune ffmpeg params for better quality (#3798) 2020-09-08 15:39:18 -07:00
Andrey Lushnikov
143adc1634
refactor: bake ffmpeg into npm instead of CDN (#3799) 2020-09-08 15:10:36 -07:00
Yury Semikhatsky
1d4601b479
browser(webkit): fix screencast scale on Mac headful (#3797) 2020-09-08 14:22:33 -07:00
Joel Einbinder
658b34e3fe
fix(lint): fix doclint and preprocessor tests (#3793) 2020-09-08 10:19:26 -07:00
Pavel Feldman
74f1a64e36
fix(debug): do not generate source urls for anonymous scripts (#3787) 2020-09-07 15:50:25 -07:00
Pavel Feldman
c83b2da54f
chore: revert isDevMode into isUnderTest (#3785) 2020-09-06 21:36:22 -07:00
Pavel Feldman
fea3ceb36c
chore: expose injectedScript.extend (#3784) 2020-09-06 18:19:32 -07:00
Pavel Feldman
d6cd0224ab
test(screencast): mark win/webkit ac as failing (#3783) 2020-09-06 14:56:46 -07:00
Pavel Feldman
f8e1fd7ead
test: add a failing test for page.press (#3780) 2020-09-05 22:38:29 -07:00
Yury Semikhatsky
66985fc5f6
feat(screencast): add expreimental public API on context (#3766) 2020-09-04 22:37:38 -07:00
Jon Picchietti
f6aab9e5bd
chore: fix minimum node version (#3777) 2020-09-04 17:18:18 -07:00
Dmitry Gozman
675ce00432
chore: introduce "instrumentation" that is used for debug and trace (#3775) 2020-09-04 16:31:52 -07:00
Arjun Attam
25fe115719
docs: update why-playwright.md (#3761)
* docs: update why-playwright.md

* review fixes
2020-09-04 13:34:28 -07:00
Yury Semikhatsky
bd7cdc3479
feat(webkit): bump to 1341 (#3774) 2020-09-04 10:22:33 -07:00
Andrey Lushnikov
bcb4944f1b
devops: auto-detect platform in //browser_patches/chromium/build.sh (#3772)
If there's no platform specified for the chromium build, we should
detect the host platform.

This will make it pleasant to verify Chromium rolls locally.
Assuming there's a `CR` env variable pointing to the local chromium,
rolling would look like this:

- bump a revision in `//browser_patches/chromium/BUILD_NUMBER`
- run `//browser_patches/chromium/build.sh`
- run tests with pulled chromium: `CRPATH=$CR npm run ctest`
2020-09-04 04:23:13 -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
Andrey Lushnikov
f09145e504 chore: fix typo in build script 2020-09-04 03:16:46 -07:00
Andrey Lushnikov
3cb3c650df
chore: build Chromium version with ffmpeg (#3770) 2020-09-04 03:14:29 -07:00
Andrey Lushnikov
a755d100b3
devops: encode build number together with Chromium revision (#3769)
This is an alternative approach to #3698 that was setting up a custom
mapping between chromium revisions and our mirrored builds. For example, we were
taking chromium `792639` and re-packaging it to our CDN as Chromium 1000.

One big downside of this opaque mapping was inability to quickly
understand which Chromium is mirrored to CDN.

To solve this, this patch starts treating browser revision as a fractional number,
with and integer part being a chromium revision, and fractional
part being our build number. For example, we can generate builds `792639`, `792639.1`,
`792639.2` etc, all of which will pick Chromium `792639` and re-package it to our CDN.

In the Playwright code itself, there are a handful of places that treat
browser revision as integer, exclusively to compare revision with some particular
revision numbers. This code would still work as-is, but I changed these places
to use `parseFloat` instead of `parseInt` for correctness.
2020-09-04 03:12:30 -07:00
Andrey Lushnikov
dfc0006b3b
devops: bundle ffmpeg with chromium (#3767)
This starts bundling FFMPEG v4.3.1 binary with Chromium archives on the
following platforms:
- chromium-mac
- chromium-win32
- chromium-win64

This specifically doesn't bundle FFMPEG with chromium-linux since we decided to use native ffmpeg on Linux instead. 

FFMPEG binaries are compiled following these instructions:
- windows: https://gist.github.com/aslushnikov/422f1e1a57796a476bf73ebe04f2e5ac
- mac: https://gist.github.com/aslushnikov/abf71be5a0b12c33b320044785fcb3bc

Our versions of FFMPEG are ~2MB zipped.

References #3680
2020-09-04 02:18:36 -07:00
Andrey Lushnikov
fa8de99611
Revert "devops: revision Chromium repackaged builds separately (#3698)" (#3763)
This reverts commit fcc1680f98.
2020-09-04 00:43:12 -07:00
Pavel Feldman
b6557b9f92
browser(webkit): remove incognito emoji from title (#3765) 2020-09-03 23:33:43 -07:00
Yury Semikhatsky
fc7b065b1b
browser(webkit): revert #3360 as it broke many sites (#3764) 2020-09-03 22:09:20 -07:00
Arjun Attam
921c8d8d8c
docs: add help section (#3741) 2020-09-03 16:57:22 -07:00
Yury Semikhatsky
52fd88b13d
fix(screencast): always send at least one frame in wpe (#3760) 2020-09-03 16:55:54 -07:00
Max Schmitt
190d16daa3
feat: add browser type to device descriptors (#3731) 2020-09-03 13:12:43 -07:00
Andrey Lushnikov
8b9be6bbbe
devops: fix publishing of @next packages to NPM (#3759)
This patch:
- stop relying on stdout from `//packages/build_package.js` to get
output paths. This was a legacy code that's not needed anymore
- remove stray output from `//packages/build_package.js`
2020-09-03 11:59:58 -07:00
Pavel Feldman
91671f5452
chore: remove unused dev dependencies (#3758) 2020-09-03 10:34:22 -07:00
Andrey Lushnikov
5364e3283f
devops: bake commit SHA inside npm package (#3754)
This bakes in `//commitinfo` file with the SHA of the commit that
produced given NPM package.

Fixes #3743
2020-09-03 10:29:43 -07:00
Dmitry Gozman
c190310335
fix(setInputFiles): make it work with CSP enabled (#3756)
We used to do fetch() to decode the file buffer. However, this is
blocked by strict CSP policy. Instead, we can use explicit
string -> bytes conversion, and trade performance for CSP compliance.
2020-09-03 10:09:03 -07:00
Dmitry Gozman
f232f34dae
test: create a page in fixture tests to exercise browser processes (#3745)
We currently launch and then close the empty browser. This does not
trigger many codepaths related to web page process creation and
browser context.

With opening and navigating a page, we do a more real-life test.
This exposes an issue from #3740.
2020-09-03 10:07:54 -07:00
Yury Semikhatsky
d3c677792c
browser(webkit): force repaint on screencast start (#3757) 2020-09-03 09:56:21 -07:00
Pavel Feldman
8df1fe47bc
test: explicitly require expect (#3755) 2020-09-03 09:43:08 -07:00
Pavel Feldman
7ad5bd90a4
test: roll test-runner to 0.2.9 (#3752) 2020-09-02 23:45:42 -07:00
Andrey Lushnikov
84a0066c9f
devops: align release publishing of docker image with dev releases (#3725)
This patch starts using the same approach to docker publishing that we
currently use to publish canary docker images.
2020-09-02 23:33:09 -07:00
Pavel Feldman
42a64048e8
test: roll test-runner to 0.2.9 (#3753) 2020-09-02 23:22:23 -07:00