Commit Graph

115 Commits

Author SHA1 Message Date
Dmitry Gozman
f1a65820f4
browser(firefox): fix addBinding on pages with CSP (#6470) 2021-05-08 18:06:56 -07:00
Pavel Feldman
edd2cc807c browser(ff): migrate screencast to client interfaces 2021-05-07 21:01:01 -07:00
Pavel Feldman
78ec057117
browser(firefox): implement screencast (#6452) 2021-05-06 19:11:42 -07:00
Pavel Feldman
765d74987f
chore(ff): remove some dead code (#6423) 2021-05-05 13:27:51 -07:00
Joel Einbinder
1a58281394
browser(firefox): don't record video outside the viewport (#6361) 2021-05-04 05:33:32 -07:00
Yury Semikhatsky
b0fae0f831
browser(firefox): merge FrameData into Frame (#6365) 2021-04-29 15:09:10 -07:00
Dmitry Gozman
10c76ff56f
browser(firefox): fix race between idleTasksFinishedPromise and window closure (#6308) 2021-04-23 16:05:37 -07:00
Andrey Lushnikov
d662eba86a
browser(firefox): roll Firefox to beta @ Apr 1, 2021 (#6041)
Merging conflicts:
038f367c30

After this roll, we no longer require our custom `onFrameLocationChanged` instrumentation
since gecko now fixed the `NOTIFY_LOCATION` behavior so that it works
for same-document navigations inside iframes.
2021-04-01 16:49:01 -07:00
Dmitry Gozman
66541552d0
browser(firefox): make dpr emulation optional, take screenshots at 1x (#5555)
- deviceScaleFactor is now optional, so we can use host machine's dpr.
- Screenshots are not scaled up by dpr.
- Removed unused methods.
2021-04-01 14:51:02 -07:00
Andrey Lushnikov
cb15603ccb
browser(firefox): do not report console messages twice. (#6031)
References #6001
2021-04-01 09:29:33 -07:00
Joel Einbinder
e56f56c11e
browser(firefox): pass null for the data transfer (#5723) 2021-03-04 17:20:45 -08:00
Andrey Lushnikov
28d9f244df
browser(firefox): roll Firefox to Beta @ Feb 28, 2021 (#5659)
Diff merges:
498eaa7a87

Additional changes:
8404fbe1ad
2021-03-02 18:52:19 -08:00
Pavel Feldman
8906ba332c
chore: spell overridden (#5605) 2021-02-24 15:11:34 -08:00
Joel Einbinder
e677e7ba4e
browser(firefox): pass drag action test (#5560) 2021-02-23 15:21:29 -08:00
Dmitry Gozman
822f7cb1eb
browser(firefox): respect Set-Cookie header from fulfilled request (#5456) 2021-02-15 22:49:57 -08:00
Andrey Lushnikov
bbfbb1b2f7
browser(firefox): fix build on Windows (#5275) 2021-02-03 09:50:35 -08:00
Yury Semikhatsky
b3e7838582
browser(firefox): clear AuthCache when setting context proxy (#4793) 2020-12-21 15:54:15 -08:00
Andrey Lushnikov
5f6ccee742
browser(firefox): roll Firefox to beta Dec 14, 2020 (#4716)
Merge conflicts: 57ba98733f
2020-12-14 15:28:48 -08:00
Dmitry Gozman
e1e000d264
browser(firefox): do not spam stderr with screencast logs (#4630) 2020-12-08 09:30:34 -08:00
Dmitry Gozman
e8419f85b6
browser(firefox): support alertCheck and confirmCheck dialogs (#4553)
These are shown with "prevent this page from showing more dialogs" checkbox.
2020-11-30 20:05:15 -08:00
Joel Einbinder
d06afadb8b
browser(firefox): send dragend after drop and survive navigations (#4506) 2020-11-25 03:47:34 -08:00
Dmitry Gozman
14a96ca21f
browser(firefox): ensure detachedFromTarget is always sent (#4505)
browser(firefox): ensure detachedFromTarget is always sent

LinkedBrowser can throw when removing listeners in PageTarget.dispose,
and that prevents BrowserHandler from sending Browser.detachedFromTarget.

Using a try-catch seems good enough.
2020-11-20 10:48:06 -08:00
Andrey Lushnikov
6bc45d9247
browser(firefox): browser.version() to return full version (#4491)
Currently, browser.version() returns `83.0`, whereas launching firefox
with `--version` flag returns `83.0b3`. This patch alings protocol's
`Browser.version()` with flag output.
2020-11-19 08:24:17 -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
Yury Semikhatsky
39fcf1bc54
browser(firefox): do not leak reponses (#4453) 2020-11-16 13:16:20 -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
Yury Semikhatsky
8488c296f9
browser(firefox): allow to override content-type along with post data (#4416) 2020-11-12 10:41:49 -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
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
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
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
Pavel Feldman
437fe17825
browser(firefox): expose resource timing info (#4205) 2020-10-21 13:55:30 -07:00
Yury Semikhatsky
092c9905e6
browser(firefox): fix screencast timescale precision (#4196) 2020-10-20 13:39:56 -07:00
Joel Einbinder
4f7d65fe9c
browser(firefox): report pageerrors without stack properties (#4166) 2020-10-19 02:23:53 -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
a4474f6752
browser(firefox): Page.dispatchTapEvent (#4101) 2020-10-13 12:24:11 -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
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
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