Commit Graph

908 Commits

Author SHA1 Message Date
Dmitry Gozman
1169c5ab50
browser(webkit): close on pipe disconnect (#4484) 2020-11-18 19:34:33 -08:00
Yury Semikhatsky
a11be3e9ef
browser(webkit): roll to 11-18 (#4481) 2020-11-18 13:03:42 -08:00
Andrey Lushnikov
cb1f2a38f3
browser(firefox): roll Firefox to Nov 17,2020 (#4477)
Changes accomodate touchEventsOverride that has moved to the
browser side.
2020-11-18 08:19:09 -08:00
Andrey Lushnikov
8860d6d11d
chore: try building webkit on github selfhosted runner (#4476) 2020-11-17 21:03:51 -08:00
Pavel Feldman
fc0388813e
browser(chromium): pick 827102 for roll (#4460) 2020-11-16 16:43:37 -08:00
Pavel Feldman
79c592ed7d
browser(webkit): do not create unique page groups for pages (#4456) 2020-11-16 14:31:50 -08:00
Yury Semikhatsky
5509e98ba5
browser(webkit): fix mac build after latest roll (#4455) 2020-11-16 14:25:58 -08:00
Yury Semikhatsky
39fcf1bc54
browser(firefox): do not leak reponses (#4453) 2020-11-16 13:16:20 -08:00
Yury Semikhatsky
bd76e9ddbf
browser(webkit): roll to 11-16 (#4451) 2020-11-16 13:02:55 -08:00
Dmitry Gozman
2f73a45e63
browser(chromium): roll to 827767 (#4452) 2020-11-16 12:43:56 -08:00
Joel Einbinder
e91140e88c
browser(firefox): force a layout before dispatching a tap (#4428) 2020-11-16 11:07:06 -08:00
Yury Semikhatsky
0167f8c182
browser(firefox): allow to override request url (#4436) 2020-11-13 14:56:27 -08:00
Dmitry Gozman
2e65f78874
browser(firefox): close browser when pipe disconnects (#4437) 2020-11-13 14:51:40 -08:00
Dmitry Gozman
9e1b26f9f9
browser(webkit): close on pipe disconnect (#4421) 2020-11-13 10:02:37 -08:00
Yury Semikhatsky
8f7286175e
browser(webkit): roll to 11-12 (#4417) 2020-11-12 11:10:42 -08:00
Yury Semikhatsky
8488c296f9
browser(firefox): allow to override content-type along with post data (#4416) 2020-11-12 10:41:49 -08:00
Pavel Feldman
d3135871e5
browser(chromium): fetch r825625 (#4406) 2020-11-11 12:45:01 -08:00
Yury Semikhatsky
508be0d78f
browser(webkit): fix big sur crashes after latest roll (#4391) 2020-11-09 22:29:52 -08:00
Yury Semikhatsky
bd75fb1c55
browser(webkit): roll to 11-09 (#4384) 2020-11-09 11:30:12 -08:00
Dmitry Gozman
ae738c1fac
browser(firefox): ignore WebProgress events coming from workers (#4380)
Somehow, we get WebProgress state changes when worker is loaded
with a blob url. This messes up frame navigation detection.

Luckily, it's easy to filter out non-document state changes.
2020-11-09 09:29:34 -08:00
Dmitry Gozman
06c8881dad
browser(firefox): fix videoSessionId (#4374)
PRIx8 produced "%hx%hx%hx%hx%hx%hx%hx%hx%hx%hx%hx%hx%hx%hx%hx%hx",
so video session ids were clashing between pages, and popup videos
did not work.
2020-11-06 15:08:03 -08:00
Joel Einbinder
d4fb159154
browser(webkit): fix webcontent startup crash on macos 11 (#4370)
reverts #4357 and provides the real fix. Apple accidentally landed some code that will crash the web process if it is not signed by them. I'm sure they will figure it out once they get test bots for macos 11. But until then, we can just revert.

https://bugs.webkit.org/show_bug.cgi?id=218342
2020-11-06 11:11:19 -08:00
Andrey Lushnikov
c522a0dfba
browser(firefox): force always active docshell (#4363)
This forces active docshell for all content processes.

References #4208
2020-11-05 17:53:22 -08:00
Yury Semikhatsky
49e4d9a347
browser(webkit): force rebuild with new redistributable dlls (#4364) 2020-11-05 17:51:28 -08:00
Yury Semikhatsky
040f9b04ca
browser(webkit): copy MS VC++ redistributable libs from VS installation (#4360) 2020-11-05 16:51:42 -08:00
Yury Semikhatsky
aafcf932bc
browser(firefox): bundle VS C++ redistributable dlls (#4359) 2020-11-05 13:56:15 -08:00
Andrey Lushnikov
bc20bfd4cc
browser(webkit): disable cache compiled sandbox (#4357)
This seems to be broken on BigSur.
2020-11-05 09:25:36 -08:00
Andrey Lushnikov
b94a7c0e60
devops: speedup initial browser checkout (#4352)
Instead of checking out the whole repository, we now do a shallow
clone.

We then gradually "unshallow" the clone, looking for the `BASE_REVISION`.

This should fix experimental mac-11 builder.
2020-11-05 02:04:06 -08:00
Andrey Lushnikov
4d8ef423ba
devops: add instructions to build mac on BigSur (#4350) 2020-11-05 00:49:05 -08:00
Yury Semikhatsky
283bc2c7d0
devops: ensure that embedder directory does not exist (#4340)
Otherwise `cp -r from to` will copy content of `from` to a subdirectory in `to`
2020-11-04 11:20:47 -08:00
Andrey Lushnikov
5dc632b82e
chore: mirror Chromium 823944 to our cdn (#4339)
References #4021
2020-11-04 09:44:30 -08:00
Yury Semikhatsky
890add98fe
browser(webkit): do not hang on close when there is a dialog (#4332) 2020-11-03 18:58:57 -08:00
Yury Semikhatsky
031f0bf539
browser(webkit): fix mac build failure caused by touch events (#4330) 2020-11-03 16:21:42 -08:00
Yury Semikhatsky
c6b4263e54
browser(webkit): fix timezone overrides after last roll (#4329) 2020-11-03 14:54:28 -08:00
Andrey Lushnikov
799604c085
browser(firefox): roll Firefox to beta @ Nov, 3 (#4327) 2020-11-03 14:51:37 -08:00
Pavel Feldman
eae3d93a20
browser(webkit): fix proxy ignore pattern set on context level (#4328) 2020-11-03 14:28:04 -08:00
Yury Semikhatsky
0a9fdc4751
browser(webkit): roll to 11-03 (#4325) 2020-11-03 13:17:03 -08:00
Andrey Lushnikov
e3b12b0a0d
browser(firefox): fix closing browser contexts with beforeunload (#4314)
References #4021
2020-11-02 17:29:54 -08:00
Andrey Lushnikov
2b495c9750
browser(firefox): fix SimpleChannel to await initialization (#4311)
As Joel noticed recently, MessageManager in firefox doesn't guarantee
message delivery if the opposite end hasn't been initialized yet. In
this case, message will be silently dropped on the ground.

To fix this, we establish a handshake in SimpleChannel to make sure that
both ends are initialized, end buffer outgoing messages until this
happens.

Drive-by: serialize dialog events to only deliver *after* the
`Page.ready` protocol event. Otherwise, we deliver dialog events to the
unreported page.
2020-11-02 16:21:34 -08:00
Dmitry Gozman
1255289098
browser(chromium): roll to 823078 (#4307) 2020-11-02 13:00:38 -08:00
Yury Semikhatsky
7ef1533cae
browser(webkit): one more mac build fix after last roll (#4298) 2020-10-30 16:15:53 -07:00
Yury Semikhatsky
3577e637c7
browser(webkit): mac build fix after last roll (#4296) 2020-10-30 14:47:53 -07:00
Yury Semikhatsky
5e50fe3d40
browser(webkit): roll to 10-30 (#4294) 2020-10-30 12:42:33 -07:00
Andrey Lushnikov
18c3efe79e
browser(firefox): instrument websockets (#4287) 2020-10-29 16:33:50 -07:00
Andrey Lushnikov
c5d3490b34
browser(firefox): roll firefox to beta Oct, 28 (#4274) 2020-10-28 14:47:14 -07:00
Yury Semikhatsky
41d514dfde
browser(webkit): disable gamepad on GTK (#4264) 2020-10-27 16:43:26 -07:00
Pavel Feldman
00d6313f6d
browser(webkit): report raw request headers from didReceiveResponse (#4250) 2020-10-26 22:05:43 -07:00
Andrey Lushnikov
b08d3dc9ff
devops: always ensure linux deps when building webkit (#4249) 2020-10-26 21:53:27 -07:00
Yury Semikhatsky
39637a4ab0
browser(webkit): build fix (#4247) 2020-10-26 18:52:25 -07:00
Yury Semikhatsky
1feb041086
browser(webkit): fix mac build after last roll (#4245) 2020-10-26 17:40:31 -07:00
Pavel Feldman
c1a64eee02
browser(webkit): serialize set-cookie \n-separated (#4243) 2020-10-26 16:58:40 -07:00
Yury Semikhatsky
4b2a29e23d
browser(webkit): roll to 10-26 (#4241) 2020-10-26 13:00:15 -07:00
Pavel Feldman
437fe17825
browser(firefox): expose resource timing info (#4205) 2020-10-21 13:55:30 -07:00
Yury Semikhatsky
920ea85b99
fix(winldd): make linker set checksum to make antiviruses happy (#4197) 2020-10-20 13:59:44 -07:00
Yury Semikhatsky
092c9905e6
browser(firefox): fix screencast timescale precision (#4196) 2020-10-20 13:39:56 -07:00
Yury Semikhatsky
54e05ac83e
browser(webkit): fix screencast timescale precision (#4195) 2020-10-20 13:09:24 -07:00
Joel Einbinder
bf491f12cf
browser(webkit): fix pointer media query on windows (#4176) 2020-10-19 10:08:02 -07:00
Yury Semikhatsky
92cde6cd06
browser(webkit): roll to 10-19 (#4177)
This should fix current build failure on Mac.

5e1333ea77 is necessary to fix the following compilation error:

CMake Error at Source/cmake/WebKitFeatures.cmake:21 (message):
  ENABLE_LEGACY_CSS_VENDOR_PREFIXES is not a valid WebKit option
Call Stack (most recent call first):
  Source/cmake/WebKitFeatures.cmake:40 (_ENSURE_IS_WEBKIT_OPTION)
  Source/cmake/OptionsWPE.cmake:89 (WEBKIT_OPTION_DEFAULT_PORT_VALUE)
  Source/cmake/WebKitCommon.cmake:58 (include)
  CMakeLists.txt:173 (include)
2020-10-19 09:17:24 -07:00
Joel Einbinder
347dd2403b
browser(webkit): fix pointer media query on mac (#4155) 2020-10-19 02:34:47 -07:00
Joel Einbinder
4f7d65fe9c
browser(firefox): report pageerrors without stack properties (#4166) 2020-10-19 02:23:53 -07:00
Pavel Feldman
26442c563c
browser(webkit): fix the datastore leak (#4163) 2020-10-16 08:14:59 -07:00
Joel Einbinder
305d209e82
browser(firefox): always send focus events (#4150) 2020-10-16 01:28:13 -07:00
Yury Semikhatsky
97cb51f3e9
browser(webkit): fix windows compilation after last roll (#4162) 2020-10-15 14:27:02 -07:00
Yury Semikhatsky
6fb6929e36
browser(webkit): roll to 10-15 (#4161) 2020-10-15 13:48:58 -07:00
Andrey Lushnikov
8f8bebb632
browser(firefox): roll Firefox to tip-of-tree Oct, 12 (#4158) 2020-10-15 09:51:21 -07:00
Joel Einbinder
a61d07a8e9
browser(webkit): report correct pointer type to css (#3936) 2020-10-15 03:28:45 -07:00
Yury Semikhatsky
3c32c1683a
browser(firefox): use 16-byte long uid instead of ordinal as screencast id (#4147) 2020-10-14 16:14:24 -07:00
Joel Einbinder
a169cb63f8
browser(webkit): fix mac compilation errors (#4139) 2020-10-14 10:35:45 -07:00
Joel Einbinder
8c6a2e197a
browser(webkit): Input.dispatchTapEvent (#4102) 2020-10-14 05:53:07 -07:00
Joel Einbinder
a4474f6752
browser(firefox): Page.dispatchTapEvent (#4101) 2020-10-13 12:24:11 -07:00
Yury Semikhatsky
71c444c59f
browser(webkit): revert changes to WebAutomationSession.h (#4128) 2020-10-13 11:43:42 -07:00
Andrey Lushnikov
58285f6155
browser(firefox): await browser initialization when closing browser (#4121)
We try to avoid closing firefox too early, fearing that this
might terminate clean shutdown sequence.

Usually we assume that `Browser.enable` is called before `Browser.close`
- however, this is not the case in certain tests. So we have to
ensure browser initialization in `Browser.close` as well.

In my local tests, this fixes the Firefox Pipe problem: it looks like
we were closing browser too quickly.
2020-10-12 22:34:04 -07:00
Yury Semikhatsky
b2f4fa914a
browser(webkit): pick process pool for service worker from correct context (#4116) 2020-10-12 15:39:49 -07:00
Yury Semikhatsky
5648eac063
browser(webkit): fix mac build after last roll (#4108) 2020-10-09 16:11:50 -07:00
Yury Semikhatsky
db744e28ee
browser(webkit): roll to 10/08 (#4106) 2020-10-09 14:43:36 -07:00
Yury Semikhatsky
b85ba62291
browser(webkit): actually fix mac compilation (#4105) 2020-10-09 13:06:25 -07:00
Yury Semikhatsky
d6a198a9bb
browser(webkit): speculative build fix for Mac (#4104) 2020-10-09 11:13:02 -07:00
Yury Semikhatsky
8252eb7413
browser(webkit): roll to 09-27 (#4103) 2020-10-09 09:32:36 -07:00
Joel Einbinder
e2f77455dd
browser(chromium): roll to 815036 (#4098) 2020-10-08 22:03:39 -07:00
Darío Kondratiuk
ff295d10e6
fix(windows): fix dependencies check on windows (#4076) 2020-10-08 09:45:53 -07:00
Andrey Lushnikov
6a7d24469a
devops: fix firefox build (#4088)
New firefox build requires a pre-created python virtual environment.
We should detect it and create if necessary.

References #3995
2020-10-07 14:34:58 -07:00
Andrey Lushnikov
1ccce09a02
browser(firefox): roll Firefox to beta Oct 7, 2020 (#4087)
References #3995
2020-10-07 14:12:19 -07:00
Andrey Lushnikov
6beef551d9
browser(firefox): wait for search and addon manager initialization (#4081)
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
2020-10-07 10:24:16 -07:00
Andrey Lushnikov
3b4232864d
browser(firefox): a different way to emit 'load' event (#4080)
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
2020-10-07 09:22:56 -07:00
Andrey Lushnikov
e6869edf98
browser(firefox): fix typo in dispatcher teardown (#4069) 2020-10-06 12:06:50 -07:00
Andrey Lushnikov
4ab66a4fe5
browser(firefox): follow-up with assorted simplifications (#4066)
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
2020-10-06 01:53:25 -07:00
Andrey Lushnikov
c8a64b88e1
browser(firefox): enable document channel (#4065)
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
2020-10-06 00:15:24 -07:00
Pavel Feldman
857abcfc10
browser(firefox): make pipe work on Windows (#4058) 2020-10-05 10:58:56 -07:00
Dmitry Gozman
a7beaf657c
browser(chromium): roll to 813607 (#4052) 2020-10-05 04:23:35 -07:00
Dmitry Gozman
133de10a47
browser(firefox): start screencast in existing pages upon setScreencastOptions (#4045)
This makes it work in persistent context.

To achieve this, we have to move screencast logic into PageTarget and
make PageHandler listen to an event.
2020-10-02 17:16:49 -07:00
Andrey Lushnikov
2c11b10598
browser(firefox): remove multisession logic (#4039)
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
2020-10-02 04:13:42 -07:00
Andrey Lushnikov
b74a6b78ef
browser(firefox): do not double-attach session to the same target (#4027)
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
2020-09-30 23:50:02 -07:00
Andrey Lushnikov
974358442d
browser(firefox): move user agent emulation to browser side (#4016)
References #3995
2020-09-30 08:02:22 -07:00
Andrey Lushnikov
e28083974d
browser(firefox): simplify PageTarget lifecycle (#4014)
As of today, we create `PageTarget` instances whenever we get a
sync IPC from the content process. This, however, breaks an invariant
that `browserContext.pages` always has all pages (and *browsing contexts* - not to be confused with *browser contexts*), associated with browser context. This invariant will be especially important when we move
user agent emulation to browser-side.

This patch makes `PageTarget` lifecycle symmetrical:
- `PageTarget` instance is created when tab is opened
- `PageTarget` is destroyed when tab is crashed or closed

This should also fix a bunch of race conditions with persistent mode, since sometimes we arrive to the window after its
initialization.

Drive-by: straighten viewport management and put a nice descriptive comment.
2020-09-30 02:10:34 -07:00
Andrey Lushnikov
24bc0e39b8
browser(firefox): remove the hack around setting viewport size (#4010)
Juggler code had a bug where we subscribed to window and tab
events, but did not iterate collections of current windows and tabs.

As a result, we were sometimes failing to set viewport size for the
initial window, and implemented an artificial promise to workaround
the problem.

This patch:
- starts calling `onOpenWindow` and `onOpenTabListener` callbacks
  for *all* windows and tabs - current and future, eliminating the
  race condition.

This worked too well and we started overriding window sizes that
were set by users with `window.open(url, 'width=300;height=400')` (we
have a test for this). To fix this, we now plumb `CHROME_WITH_SIZE`
flag from appWindow and override viewport iff this flag is not set.

After this patch, we will use the `onTabOpened` event to move user
agent emulation to the browser-side.

References #3995
2020-09-30 00:36:46 -07:00
Andrey Lushnikov
2631e1a809
browser(firefox): use browsingContextID for frame IDs (#3999)
BrowsingContextIDs are consistent across the processes, so we can use
them to target frames in both browser and content processes. This will
aid browser-side navigation.

As a nice side-effect, we can drop a round-trip to the content process
for every `requestWillBeSent` event since we *almost* always can
attribute all network events to the proper parent frames.

I say "almost", because we in fact **fail** to correctly attribute requests
from workers that are instantiated by subframes. This, however, is
not working in Chromium ATM, so I consider this to be a minor regression
that is worth the simplification.
2020-09-29 11:22:00 -07:00
Yury Semikhatsky
c4a2732515
browser(webkit): another mac fix (#3948) 2020-09-21 19:03:44 -07:00
Yury Semikhatsky
ce51af0509
brower(webkit): add missing override markers (#3947) 2020-09-21 17:59:11 -07:00
Yury Semikhatsky
2fbe767142
browser(webkit): roll to 09/21 (#3945) 2020-09-21 16:04:38 -07:00
Andrey Lushnikov
2693c162b8
devops(ffmpeg): compile zlib dependency that is needed for ffmpeg (#3940)
This patch adds zlib compilation that is required for ffmpeg.
2020-09-21 14:54:22 -07:00
Pavel Feldman
731560ccbc
browser(chromium): roll to v808777 (#3941) 2020-09-21 14:40:26 -07:00
Andrey Lushnikov
ee7c6230ae
devops: compile ffmpeg with support of video splitting (#3938) 2020-09-21 12:02:47 -07:00
Andrey Lushnikov
9de39b1e85
devops: hardcode build number in winldd executable (#3923)
This will allow us to trace builds back to source code.
2020-09-18 14:51:08 -07:00
Andrey Lushnikov
bff9fb21ec devops: fix winldd build 2020-09-18 11:30:53 -06:00
Andrey Lushnikov
6af0aa6763 devops: notify when winldd is built 2020-09-18 11:26:59 -06:00
Andrey Lushnikov
fda31dfca2
devops: build winldd on buildbots (#3917)
This patch:
- moves PrintDepsWindows folder to `//browser_patches/winldd`
- adds `build.sh`, `archive.sh`, `clean.sh` and `BUILD_NUMBER` to
  power builds on buildbots
- starts building `winldd-win64` on windows buildbot
2020-09-18 09:43:43 -07:00
Andrey Lushnikov
e4e3f82337
devops: fix ffmpeg linux build (#3884)
The `PKG_CONFIG_PATH` variable is important since it is needed
to resolve `.pc` library files.
2020-09-14 17:46:07 -07:00
Andrey Lushnikov
2a66f8a066
devops: build ffmpeg for linux (#3880) 2020-09-14 15:12:35 -07:00
Yury Semikhatsky
b8e90a5582
browser(webkit): duplicate each frame duration times (#3856) 2020-09-11 13:48:39 -07:00
Yury Semikhatsky
25b199b40a
browser(firefox): fix screencast start event for popups (#3834) 2020-09-10 14:37:48 -07:00
Yury Semikhatsky
d64d0025a4
browser(firefox): fix screencast in first window on mac headful (#3826)
* browser(firefox): fix screencast in first window on mac headful

* Revert only
2020-09-10 00:40:56 -07:00
Andrey Lushnikov
3124a1b600
devops: fine-tune ffmpeg compilation (#3823)
This patch:
- removes `--enable-gpl` and `--enable-version3` flags. This defaults
builds to LGPL2 license
- includes `--disable-autodetect` to ensure determenism
- includes extra version suffix to link from binary files back to these
build scripts
2020-09-09 18:43:38 -07:00
Andrey Lushnikov
29b809887e
devops: fix running docker when executed from cronjob (#3822)
Turns out docker doesn't like faking terminal if STDIN is not attached
to a real terminal.
2020-09-09 17:27:14 -07:00
Andrey Lushnikov
245d1001b1
devops: produce ffmpeg builds on bots (#3820)
This patch moves FFMPEG building to buildbots:
- `ffmpeg-mac.zip` is built on Mac 10.14 machine
- `ffmpeg-win32.zip` and `ffmpeg-win64.zip` are cross-compiled on
  Ubuntu 20.04 machine

All builds across the platforms share the same config:
- the same versions of `ffmpeg` and `libvpx`
- the same build configuration for both `ffmpeg` and `libvpx`

The config could be found in the `//browser_patches/ffmpeg/CONFIG.sh`.

The builds will be then copied manually and committed to the git
repository.
2020-09-09 17:05:08 -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
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
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
a5a563659b
browser(webkit): fix basic screencast for accelerated compositing on win (#3803) 2020-09-08 16:00:51 -07:00
Yury Semikhatsky
1d4601b479
browser(webkit): fix screencast scale on Mac headful (#3797) 2020-09-08 14: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
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
Yury Semikhatsky
d3c677792c
browser(webkit): force repaint on screencast start (#3757) 2020-09-03 09:56:21 -07:00
Yury Semikhatsky
6b085a349c
browser(webkit): do not clear existing contexts from map when exiting (#3750) 2020-09-02 18:13:03 -07:00
Yury Semikhatsky
ee1becd897
browser(firefox): autoscale screencast to fit frame (#3720) 2020-09-01 17:10:06 -07:00
Pavel Feldman
76ab82faa7
browser(webkit): prepend http:// to the schema-less URLs (#3713) 2020-09-01 14:28:21 -07:00
Yury Semikhatsky
fad840d88d
browser(webkit): fit screencast to frame if no scale is specified (#3707) 2020-09-01 12:04:46 -07:00
Andrey Lushnikov
fcc1680f98
devops: revision Chromium repackaged builds separately (#3698)
Currently, we mirror Chromium revisions from gbuckets to our cdn and
name them same way as Chromium revision.

However, with the upcoming bundling of FFMPEG, we'd like to revision
Chromium packages separately, since our Chromium package will depend from
a number of factors:
- chromium upstream revision
- ffmpeg version
- extra files to add to the package or remove from the package

We should be able to produce a new Chromium build once any of these changes.

With this patch, to roll Chromium browser:
- update chromium revision number in the
`//browser_patches/chromium/UPSTREAM_CONFIG.sh`
- bump the build number in the `//browser_patches/chromium/BUILD_NUMBER`

Reference #3680
2020-08-31 10:44:33 -07:00
Joel Einbinder
abb50a79bd
browser(firefox): fix request frame attribution (#3657)
Firefox will sometimes send multiple requests with the same http channel id. When a frame is loaded, the favicon is requested in the parent frame, but with the same channel id. This can cause the document request to report the wrong frame, causing the test 'should capture iframe navigation request' to fail. It fails consistently on my computer.

This patch adds the content policy type into the http channelId to better distinguish requests. Maybe there is something better we can do? It looks like we use channelId has request ids, so there might be more bugs with these favicon requests in playwright?
2020-08-28 17:55:05 -07:00
Carlos Alberto Lopez Perez
19f21b1bde
browser(webkit): use webkit generate-bundle tool to generate the bundles (#3563)
* This changes the archive.sh script to use the webkit generate-bundle
 tool to generate the MiniBrowser bundles instead of using our custom
 logic.

 * pw_run.sh is simplified because the new bundles include a wrapper
 script that sets the needed LD_LIBRARY_PATH environment variables.
 pw_run.sh now calls this wrapper script (for GTK or WPE) instead of
 calling the MiniBrowser binary directly when running from a bundle.

Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2020-08-28 10:48:57 -07:00
Yury Semikhatsky
80cf7e9fac
browser(webkit): do not crash when opening web inspector (#3631) 2020-08-26 08:55:18 -07:00
Yury Semikhatsky
1a37f8ba7a
browser(webkit): remove browserContextId from some events (#3628) 2020-08-25 17:15:21 -07:00
Yury Semikhatsky
17077fd901
browser(firefox): introduce browser level screencastFinished event (#3625) 2020-08-25 14:50:40 -07:00
Pavel Feldman
a0bd8def74
browser(chromium): package r799610 (#3624) 2020-08-25 13:14:31 -07:00
Pavel Feldman
c25dfba878
infra: pull chromium 801321 (#3620) 2020-08-25 08:16:03 -07:00
Yury Semikhatsky
14abee2b00
browser(webkit): fix compilation on mac (#3619) 2020-08-25 07:54:05 -07:00
Yury Semikhatsky
db7bec36c5
browser(webkit): introduce screencastFinished event on Context (#3611) 2020-08-24 19:59:35 -07:00
Yury Semikhatsky
1c6968269a
browser(webkit): avoid use after free on page close (#3599) 2020-08-24 10:38:39 -07:00
Yury Semikhatsky
4f1f972143
browser(webkit): fix mac compilation (#3598) 2020-08-24 08:56:33 -07:00
Yury Semikhatsky
93d8839947
browser(webkit): explicitly track pages reported for context (#3574) 2020-08-21 19:59:53 -07:00
Carlos Alberto Lopez Perez
de5ecc028f
browser(webkit): roll to r266002 08/21/2020 (#3561) 2020-08-21 09:56:10 -07:00
Yury Semikhatsky
9f3a1b5168
browser(firefox): send screencastStarted after attachedToTarget (#3554) 2020-08-20 14:03:05 -07:00
Yury Semikhatsky
5ba0254c99
browser(firefox): make sure response is sent when context is closed (#3553) 2020-08-20 13:26:04 -07:00
Yury Semikhatsky
854d755db5
browser(firefox): make context close wait for sessions to finish (#3550) 2020-08-20 11:04:57 -07:00