Everywhere in our api, possibly missing properties are nullable.
However, to make things easier for everyone, we just default to an
empty url instead, so that users do not have to null-check it.
Make sure executable exists before launching it. If it doesn't and
we were launched without custom executable path, print a helpful
instruction to run `npm i playwright` and get browsers downloaded.
Note: there's already a test that makes sure bad executable paths
are treated fairly: 9132d23b2b/test/launcher.jest.js (L54-L59)
This doesn't test missing default browser installation which I think is
fine.
Fixes#3161
WebKit WPE assumes `libglesv2.so` is available on the host system
and uses `dlopen` to open it.
This patch starts using `ldconfig -p` to check if the library
exists on the system.
References #2745
Renderer-based method DOM.getContentQuads and DOM.getBoxModel return
coordinates relative to the local root's viewport, but we need them relative
to the root viewport.
This adds one more protocol message __dispose__
to dispose a scope and all child objects.
Now, client side does not need a notion of scope anymore -
it just disposes the whole object subtree upon __dispose__.
Server, on the other hand, marks some objects as scopes
and disposes them manually, also asserting that all parents
are proper scopes.
This makes it easier to reason about our packages.
The only difference is what each package downloads.
When the browser is not downloaded, it will fail to launch.
Each browser gets a 'download' attribute in the browser.json file.
The original plan was to rnu some checks against libc version the
binary is compiled with, but these turn out to be a little complicated:
parsing out libc version from both static binary and host system
requires text processing, and it's hard to make sure it works reliably
across distributions.
Instead, let's start with a very particular check against running
Firefox on Ubuntu 16.04.
References #2745
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.
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
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