Certain environments, e.g. Azure Pipelines, override default user
inside container with a custom one, whereas fail to pass proper
seccomp profile for the docker image.
As a result, chromium sandboxing fails.
To ease life of devops deploying tests in various CI's, this patch
disables Chromium sandbox by default.
References #4084
In version 1.4 we introduced a breaking change for the Docker behaviour since we removed the pwuser completely. In this PR I add this user again and create a symlink so that root uses the browser of the pwuser. This has also the benefit, that the users who wants to use the seccomp profile that they don't have to create this user.
Reference: https://playwright.slack.com/archives/CSUHZPVLM/p1600240776120400
Tested on root and on pwuser. Works.
References #4084
Currently, `playwright-core` installation would check browser registry
and remove any unused browsers. This, however, might be unexpected
since `playwright-core` shouldn't touch browser registry at all.
Fixes#4083
This roll includes two important fixes:
- await search service startup when launching browser
- report `"load"` event differently to support `window.stop()` in future
References #3995
It looks like terminating browser when search service or addon manager is
not fully initialized results in a broken shutdown sequence. As of
today, this results in multiple errors in the browser STDERR. In future,
this might also result in browser stalling instead of terminating.
This starts awaiting search and addon manager termination.
References #3995
Using WebProgressListener events works in all cases. Currently
used `pageshow` event will stop being emitted in future when loading
was stopped with `window.stop()` api.
References #3995
This patch:
- moves `SimpleChannel` to synchronously dispatch buffered commands
instead of a `await Promise.resolve()` hack
- moves dialog & screencast handling from `PageHandler` to
`TargetManager`. This leaves `PageHandler` to be concerned solely about
protocol.
- removes `attach` and `detach` methods for worker channels: since
channels are buffering messages until the namespace registers, there's
no chance to loose any events.
- slightly simplifies `PageNetwork` class: it's lifetime is now
identical to the lifetime of the associated `PageTarget`, so a lot can
be simplified later on.
References #3995
In the current tip-of-tree Firefox, document channel is enabled by
default, so we have to enable it in order to roll further.
This patch:
1. Removes content disposition sniffing from content process since it
crashes renderer with document channel.
2. Merges all page-related handlers in a single `PageHandler` and
serializes network events wrt the `Page.frameAttached` event.
The serialization mentioned in (2) is necessary: frame attachment is
reported from the content process, and network events are reported from
the browsers process. This is an inherent race, that becomes exposed by
the document channel.
On a side note, (2) makes it possible to synchronously report all
buffered events in `SimpleChannel` (cc offline discussion with @dgozman
that highlighted an unsighty approach that we currently employ there: reporting
events in a subsequent microtask.)
References #3995
This patch:
1. Changes `SimpleChannel` to buffer messages to the namespace that
hasn't been registered yet. This allows us to create `SimpleChannel`
per target on the browser side right away.
2. Removes multisession support. Now there's only one `PageAgent` in the
content process, which talks to a single `PageHandler` on the browser
side. Both ends can be created as-soon-as-needed; thanks to
`SimpleChannel` bufferring, no messages will be lost and all messages
will be delivered in proper order. (This is currently the reason why
build 1178 flakes on windows).
3. Straightens up the target reporting. Targets are reported as soon
as they appear on the browser side.
**NOTE:** this doesn't yet remove sessions from protocol.
References #3995
We currently might double-attach to the target in `BrowserHandler` since we iterate over all targets, and then subscribe to the additional event when target is getting initialized.
This patch fixes this race condition and should unblock the roll to r1177.
References #3995