Commit Graph

2514 Commits

Author SHA1 Message Date
Yury Semikhatsky
3162c06f49
browser(webkit): outerWidth/Height on Windows (#3154) 2020-07-24 14:10:32 -07:00
Pavel Feldman
e7cca86757
fix(postData): allow overriding binary post data (#3120) 2020-07-24 12:16:45 -07:00
Andrey Lushnikov
bec34db686
feat(firefox,webkit): roll both Firefox and WebKit (#3145) 2020-07-24 10:17:55 -07:00
Dmitry Gozman
deccddba24
feat(rpc): update BrowserServer (#3112)
- Make BrowserServer a scope.
- Plumb exitCode and signal to BrowserServer.on('close').
- Use toImpl in a test.
2020-07-24 10:17:07 -07:00
Dmitry Gozman
0f0e2acfaf
fix(type): unify selection behavior when typing (#3141)
Before typing/pressing, we focus the target element. WebKit
sometimes selects the value in this case. To unify the behavior
between the browsers we behave similar to human:
- when the input is already focused, we just type;
- when the input is not focused, we focus it, move caret
  to the start (like if user clicked at the start to focus the input)
  and then type.
Note this only affects inputs with non-empty value.
2020-07-24 09:30:31 -07:00
Andrey Lushnikov
678d16454a
devops: normalize blob names on the CDN (#3136)
This establishes a single naming for all our blobs with browser
builds that we upload to CDN: `<browser-name>-<os-version>`

- `<browser-name>` is either `firefox` or `webkit`.
- `os-version` is the OS that was used to produce the build.

References #2745
2020-07-24 00:31:18 -07:00
Yury Semikhatsky
79ab07bd0d
devops: install Media Pack on Windows bot (#3137) 2020-07-23 18:06:16 -07:00
Andrey Lushnikov
bbe7dbe9ae
feat(installer): start downloadinb Ubuntu 20.04 builds (#3126)
Start auto-detecting Ubuntu 20.04 and downloading custom webkit
build for it.

References #2745
2020-07-23 17:37:47 -07:00
Andrey Lushnikov
0b9c6473b6
devops: detect completion status (#3135)
Update `//browser_patches/tools/check_cdn.sh` to report when
all builds for a given revision are successfully uploaded to CDN.
2020-07-23 17:32:43 -07:00
Andrey Lushnikov
ae574b302f
devops: fix webkit build on ubuntu (#3134)
Sometimes we actually pass one empty argument.
2020-07-23 16:59:45 -07:00
Joel Einbinder
059004b179
fix(test): don't leave so many zombies on sigint (#3130) 2020-07-23 16:47:43 -07:00
Yury Semikhatsky
74941340be
browser(webkit): correctly report outerWidth/Height on Mac (#3131) 2020-07-23 16:16:31 -07:00
Andrey Lushnikov
c1032ae483
devops: simplify building webkit on linux bots (#3127)
Originally there was no way to build both webkit-gtk and webkit-wpe
in the same checkout. As a result, we were:
- building webkit-gtk & uploading it to CDN
- building webkit-wpe & uploading it to CDN
- downloading webkit-gtk & webkit-wpe from CDN and compiling a single
webkit-gtk-wpe folder that we uploaded to CDN

As of today, however, we can build WPE and GTK ports together. This
patch starts using this to drastically simplify build process:
- build webkit-gtk and webkit-wpe
- use `archive.sh` script that compiles a single folder with both ports
- upload archive to the cloud

This should also fix currently failing webkit build that fails to
assemble the `webkit-gtk-wpe` folder (I missed these codepaths while preparing
for Ubuntu-20.04 bot).

References #2745
2020-07-23 15:57:53 -07:00
Dmitry Gozman
d234dac752
chore: support esm imports (#3125) 2020-07-23 15:14:36 -07:00
Andrey Lushnikov
21581a4e8b devops: fix buildbot names 2020-07-23 14:44:28 -07:00
Andrey Lushnikov
cb77d33a42
devops: add script for ubuntu 20.04 buildbot (#3123)
This will start producing Ubuntu 20.04 webkit builds

References #2745
2020-07-23 14:42:14 -07:00
Joel Einbinder
d2f24e8888
integrate toBeGolden with jest's snapshot system (#3124) 2020-07-23 14:19:51 -07:00
Yury Semikhatsky
e5afd92762
chore(tests): resuse tmp file helpers from utils (#3119) 2020-07-23 12:42:39 -07:00
Andrey Lushnikov
63689e36a6
devops: prepare buildbots to the introduction of Ubuntu 20.04 builder (#3116)
This patch:
- specializes "linux" scripts into "Ubuntu 18.04" scripts
- renames all future linux blobs on CDN:
    * `firefox-linux.zip => firefox-ubuntu-18.04.zip`
    * `minibrowser-gtk.zip => minibrowser-gtk-ubuntu-18.04.zip`
    * `minibrowser-wpe.zip => minibrowser-wpe-ubuntu-18.04.zip`
    * `minibrowser-gtk-wpe.zip => minibrowser-gtk-wpe-ubuntu-18.04.zip`
- updates downloader to deal with the new names

References #2745
2020-07-23 11:59:23 -07:00
Dmitry Gozman
2bed312911
fix(electron): emit close events in the correct order (#3111) 2020-07-23 11:02:43 -07:00
Dmitry Gozman
30e21e0bee
test: fix api coverage (#3114)
Coverage for browser-specific events was missing.
2020-07-23 10:30:47 -07:00
Dmitry Gozman
244ce45799
test: add a test for mouse.dblclick (#3115)
We never call it the tests, but coverage does not catch it.
2020-07-23 10:30:35 -07:00
Yury Semikhatsky
c895c972ae
browser(webkit): kick-off build for #3100 (#3113) 2020-07-23 09:32:22 -07:00
Yury Semikhatsky
08b0dc6b8a
feat(webkit,firefox): bump versions (#3110) 2020-07-23 09:17:30 -07:00
Yury Semikhatsky
1cfba7f582
browser(webkit): periodically capture frames on mac regardless of updates 2020-07-22 23:38:48 -07:00
Yury Semikhatsky
26c57846bb
Rebase (#3096) 2020-07-22 23:34:52 -07:00
Yury Semikhatsky
3d37e4586e
browser(firefox): pass actual frame duration to the codec (#3101)
#1158
2020-07-22 23:27:49 -07:00
Pavel Feldman
b271624fcb
browser(webkit): hardcode woff enabled on win (#3103) 2020-07-22 20:46:00 -07:00
Dmitry Gozman
68c4f79b02
feat(rpc): convert protocol to yaml (#3102) 2020-07-22 19:38:19 -07:00
Dmitry Gozman
b1a5a02154
feat(rpc): client-side parameters validation (#3069) 2020-07-22 18:05:07 -07:00
Pavel Feldman
e56e148597
test(postData): add a failing firefox test (#3098) 2020-07-22 17:27:05 -07:00
Dmitry Gozman
65002a0ac2
feat(rpc): support firefox user prefs (#3093)
Also ignore firefoxUserPrefs in launchPersistentContext according to our api.
2020-07-22 17:20:00 -07:00
Pavel Feldman
80c0711d98
feat(firefox): roll firefox to r1137 (#3095) 2020-07-22 15:59:37 -07:00
Pavel Feldman
2a08883ef8
chore(download): follow up to remove the redundant checks (#3097) 2020-07-22 15:59:11 -07:00
Pavel Feldman
baa0956915
Revert "test: screenshot on failure (#3053)" (#3091)
It should be opt-in and configurable. The folder we collect information
into should be consistent with the rest of the artifacts we collect.
Lets revisit it later.
2020-07-22 15:00:37 -07:00
Ross Wollman
d8a17fb0ab
api(download): Add saveAs helper (#2872) 2020-07-22 14:55:27 -07:00
Dmitry Gozman
4db035dff4
chore: roll_browser to also update docs (#3088) 2020-07-22 11:03:35 -07:00
Andrey Lushnikov
ea5dfdbec7
fix: re-write Chromium startup error with clear instructions (#3070)
This patch detects Chromium crash with a sandboxing error and re-writes
the error to surface information nicely.

#### Error Before:

```sh
pwuser@23592d09b3bd:~/tmp$ node a.js
(node:324) UnhandledPromiseRejectionWarning: browserType.launch: Protocol error (Browser.getVersion): Target closed.
=========================== logs ===========================
[browser] <launching> /home/pwuser/.cache/ms-playwright/chromium-790602/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disab
le-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies --disable-hang-monitor --disab
le-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --user-data-dir=/tmp/playwrig
ht_chromiumdev_profile-mjSfr2 --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --no-startup-window
[browser] <launched> pid=401
[browser] [0722/170825.030020:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live
dangerously and need an immediate workaround, you can try using --no-sandbox.
[browser] #0 0x55ac4f8c7be9 base::debug::CollectStackTrace()
[browser] #1 0x55ac4f841c13 base::debug::StackTrace::StackTrace()
[browser] #2 0x55ac4f853680 logging::LogMessage::~LogMessage()
[browser] #3 0x55ac4df2307e content::ZygoteHostImpl::Init()
[browser] #4 0x55ac4f40dd47 content::ContentMainRunnerImpl::Initialize()
[browser] #5 0x55ac4f45c9fa service_manager::Main()
[browser] #6 0x55ac4f40c361 content::ContentMain()
[browser] #7 0x55ac4f45b5bd headless::(anonymous namespace)::RunContentMain()
[browser] #8 0x55ac4f45b2bc headless::HeadlessShellMain()
[browser] #9 0x55ac4ccc22e7 ChromeMain
[browser] #10 0x7f0f3d736b97 __libc_start_main
[browser] #11 0x55ac4ccc212a _start
[browser]
[browser] Received signal 6
[browser] #0 0x55ac4f8c7be9 base::debug::CollectStackTrace()
[browser] #1 0x55ac4f841c13 base::debug::StackTrace::StackTrace()
[browser] #2 0x55ac4f8c7785 base::debug::(anonymous namespace)::StackDumpSignalHandler()
[browser] #3 0x7f0f437b3890 (/lib/x86_64-linux-gnu/libpthread-2.27.so+0x1288f)
[browser] #4 0x7f0f3d753e97 gsignal
[browser] #5 0x7f0f3d755801 abort
[browser] #6 0x55ac4f8c66e5 base::debug::BreakDebugger()
[browser] #7 0x55ac4f853aeb logging::LogMessage::~LogMessage()
[browser] #8 0x55ac4df2307e content::ZygoteHostImpl::Init()
[browser] #9 0x55ac4f40dd47 content::ContentMainRunnerImpl::Initialize()
[browser] #10 0x55ac4f45c9fa service_manager::Main()
[browser] #11 0x55ac4f40c361 content::ContentMain()
[browser] #12 0x55ac4f45b5bd headless::(anonymous namespace)::RunContentMain()
[browser] #13 0x55ac4f45b2bc headless::HeadlessShellMain()
[browser] #14 0x55ac4ccc22e7 ChromeMain
[browser] #15 0x7f0f3d736b97 __libc_start_main
[browser] #16 0x55ac4ccc212a _start
[browser]   r8: 0000000000000000  r9: 00007ffd38a863b0 r10: 0000000000000008 r11: 0000000000000246
[browser]  r12: 00007ffd38a87680 r13: 00007ffd38a86610 r14: 00007ffd38a87690 r15: aaaaaaaaaaaaaaaa
[browser]   di: 0000000000000002  si: 00007ffd38a863b0  bp: 00007ffd38a86600  bx: 00007ffd38a86e44
[browser]   dx: 0000000000000000  ax: 0000000000000000  cx: 00007f0f3d753e97  sp: 00007ffd38a863b0
[browser]   ip: 00007f0f3d753e97 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
[browser]  trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[browser] [end of stack trace]
[browser] Calling _exit(1). Core file will not be generated.
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.Error
    at /home/pwuser/tmp/node_modules/playwright/lib/chromium/crConnection.js:131:63
    at new Promise (<anonymous>)
    at CRSession.send (/home/pwuser/tmp/node_modules/playwright/lib/chromium/crConnection.js:130:16)
    at CRSession.send (/home/pwuser/tmp/node_modules/playwright/lib/helper.js:78:31)
    at Function.connect (/home/pwuser/tmp/node_modules/playwright/lib/chromium/crBrowser.js:54:39)
    at Chromium._connectToTransport (/home/pwuser/tmp/node_modules/playwright/lib/server/chromium.js:52:38)
    at Chromium._innerLaunch (/home/pwuser/tmp/node_modules/playwright/lib/server/browserType.js:87:36)
    at async ProgressController.run (/home/pwuser/tmp/node_modules/playwright/lib/progress.js:75:28)
    at async Chromium.launch (/home/pwuser/tmp/node_modules/playwright/lib/server/browserType.js:60:25)
    at async /home/pwuser/tmp/a.js:4:19
(node:324) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise reject
ion, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:324) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```


#### Error After:

```sh
pwuser@23592d09b3bd:~/tmp$ node a.js
(node:222) UnhandledPromiseRejectionWarning: browserType.launch: Chromium sandboxing failed!
================================
To workaround sandboxing issues, do either of the following:
  - (preferred): Configure environment to support sandboxing: https://github.com/microsoft/playwright/blob/master/docs/troubleshooting.md
  - (alternative): Launch Chromium without sandbox using 'chromiumSandbox: false' option
================================
Error
    at /home/pwuser/tmp/node_modules/playwright/lib/chromium/crConnection.js:131:63
    at new Promise (<anonymous>)
    at CRSession.send (/home/pwuser/tmp/node_modules/playwright/lib/chromium/crConnection.js:130:16)
    at CRSession.send (/home/pwuser/tmp/node_modules/playwright/lib/helper.js:78:31)
    at Function.connect (/home/pwuser/tmp/node_modules/playwright/lib/chromium/crBrowser.js:54:27)
    at Chromium._connectToTransport (/home/pwuser/tmp/node_modules/playwright/lib/server/chromium.js:53:38)
    at Chromium._innerLaunch (/home/pwuser/tmp/node_modules/playwright/lib/server/browserType.js:89:36)
    at async ProgressController.run (/home/pwuser/tmp/node_modules/playwright/lib/progress.js:75:28)
    at async Chromium.launch (/home/pwuser/tmp/node_modules/playwright/lib/server/browserType.js:61:25)
    at async /home/pwuser/tmp/a.js:4:19
(node:222) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise reject
ion, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:222) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```

References #2745
2020-07-22 10:57:58 -07:00
Dmitry Gozman
1aee8dfc7c
feat(rpc): align types/guids in the protocol with their pdl definition (#3079)
This makes the protocol self-explanatory, and avoids silly conversions
in codegenerators, e.g. cdpSession <-> CDPSession.
2020-07-22 10:37:21 -07:00
Pavel Feldman
f50f228a1f
browser(chromium): roll chromium to r790602 (#3082) 2020-07-22 09:21:23 -07:00
Joel Einbinder
773ee08e9d
chore(test): restore api coverage checks (#3068)
* chore(test): restore api coverage checks

* try to catch the correct error on the bots

* try to trick github into taking the new code

* uninstall coverage

* dgozman comments
2020-07-22 09:08:10 -07:00
Yury Semikhatsky
6e75533c63
chore: respect jest params in npm run wtest (#3085) 2020-07-22 08:57:54 -07:00
Pavel Feldman
2b0b0a9119
fix(misc): assorted fixes (#3031) 2020-07-21 23:48:21 -07:00
Dmitry Gozman
ced0bc2d1b
api: make clear the use of null in page.emulateMedia (#3078)
We can pass null to disable emulating particular feature.
This change updates the docs and rpc protocol accordingly.
2020-07-21 18:56:41 -07:00
Yury Semikhatsky
f751ab1791
browser(webkit): write screencast video to .webm instead of .ivf (#3081) 2020-07-21 18:49:52 -07:00
Andrey Lushnikov
c0d9ccfebf
docs: update documentation on Chromium sandbox (#3077)
This patch:
- updates docker seccomp profile to use a slightly modified default docker
profile
- removes SUID sandbox documentation since it doesn't seem to work

References #2745
2020-07-21 17:43:41 -07:00
Joel Einbinder
f4b7ed5542
fix(chromium): reland support selectAll on macos (#3038)
Co-authored-by: Joel Einbinder <joel.einbinde@gmail.com>
2020-07-21 16:33:46 -07:00
Joel Einbinder
3c151d8f1d
fix(test): don't output babel's debug info on the bots (#3073) 2020-07-21 16:23:46 -07:00
Dmitry Gozman
db4e856a57
feat(rpc): use SerializedValue for CDPSession (#3076)
This is our way to define a schema for arbitrary values.
2020-07-21 15:58:00 -07:00
Dmitry Gozman
1553f19bab
chore: update error messages to match future rpc validator (#3075) 2020-07-21 15:25:31 -07:00