Commit Graph

74 Commits

Author SHA1 Message Date
Yury Semikhatsky d33455dcca
browser(firefox): dispatch console messages even if there are workers (#16068) 2022-07-29 16:56:17 -07:00
Andrey Lushnikov e9d66535ba
browser(firefox): move screenshots to browser-side (#15230)
* `clip` option is always passed from the client code
* with this change, we can no longer capture screenshot of a blinking
  caret; the browser-side API doesn't have this capability.
2022-07-06 15:02:48 -07:00
Andrey Lushnikov 8a8bdec87d
browser(firefox): roll Firefox Stable to 102 (#15321)
This roll:
- NetworkObserver now uses the `remote's` ChannelEventSink layer to
  subscribe to redirects.
- Wheel events now must be dispatched from browser process.
- There's a new API for console messages
- The old methods to wait for search service and addon manager no longer
  work; speculatively remove them since neither `remote` nor
  `marionette` have anything like this.

Native manual merge: 9e6fcfd868
2022-07-05 08:20:01 -07:00
Dmitry Gozman 141093a1cd
browser(firefox): a11y haspopup is a string, not a boolean (#15056) 2022-06-22 17:01:13 -07:00
Dmitry Gozman 94a0d669b6
browser(firefox): expose Response.fromServiceWorker (#14606)
This property is "true" when network response was fulfilled
by the service worker.
2022-06-02 17:16:19 -07:00
Pavel Feldman 618cc66c8d
browser(firefox): manage scripts to evaluate on load on front-end (#12101) 2022-02-14 20:32:12 -08:00
Andrey Lushnikov fba29aa319
browser(firefox): fix HTTP->HTTPS fallback for refused connection (#11123)
In this case, there's no protocol version that we can extract for
nsIHttpChannel.

The code that does the redirect is here: 7f3d9fce41/docshell/base/nsDocShell.cpp (L6079-L6095)

To trigger this codepath, we'd need to run test inside a special
docker container that has https server running on the 443 port. We lack
infrastructure for this kind of tests (but it'll be cool to have it).

References #11118
2021-12-28 12:23:53 -08:00
Yury Semikhatsky 091c0065ad
browser(firefox): delete response interception code (#10053) 2021-11-04 12:29:36 -07:00
Max Schmitt 4e95448887
browser(firefox): expose encodedBodySize in requestFinished (#8835) 2021-09-10 08:41:34 -07:00
Max Schmitt 1762f4c547
browser(firefox): expose protocolVersion in ResponseFinished (#8687) 2021-09-03 11:39:38 -07:00
Joel Einbinder e04ff81921
browser(firefox): Browser.setPlatformOverride (#8440) 2021-08-25 11:45:45 -04:00
Joel Einbinder f7950352b9
browser(firefox): Page.dispatchWheelEvent (#8439) 2021-08-25 11:27:12 -04:00
Dmitry Gozman 4344b3810a
browser(firefox): fix a race between Browser.close and closing context (#8294) 2021-08-18 14:47:21 -07:00
Yury Semikhatsky 90385a7941
browser(firefox): failure response interception (#8194) 2021-08-16 09:36:28 -07:00
Dmitry Gozman dba3c5055f
browser(firefox): support start/stop videos for context (#8173) 2021-08-12 17:17:54 -07:00
Andrey Lushnikov 75dfc15e62
browser(firefox): roll to new Firefox Stable M91 (#8130) 2021-08-10 17:37:57 -07:00
Yury Semikhatsky f9efc7f8a4
browser(firefox): response interception after redirects (#8107) 2021-08-10 14:43:21 -07:00
Yury Semikhatsky efb21b9e9f
browser(firefox): support response interception (#7509) 2021-07-09 05:41:53 -07:00
Max Schmitt 18266722a1
browser(firefox): add Download.cancel (#7390) 2021-06-30 01:29:58 +02:00
Max Schmitt 8fa93ae6be
browser(firefox): add transferSize to Network.requestFinished (#7355) 2021-06-28 21:22:55 +02:00
Max Schmitt 226159defc
browser(firefox): forced-colors media query emulation (#6902) 2021-06-09 01:00:15 +02:00
Max Schmitt c4a6c2bcab
browser(firefox): added reduced motion emulation (#6618) 2021-05-18 21:23:12 +02:00
Andrey Lushnikov debffa7476
browser(firefox): make Juggler types compliant with protocol viewer (#6626)
Protocol viewer can't handle anonymous objects since it's not clear how
to refer to them.
2021-05-17 21:40:29 -07:00
Joel Einbinder 5b223f92c8
browser(firefox): Browser.setScrollbarsHidden (#6457) 2021-05-14 08:06:34 -07:00
Yury Semikhatsky 84031d4a07
browser(firefox): simplify isolated world structures (#6521) 2021-05-12 08:52:08 -07:00
Yury Semikhatsky f8039bed10
browser(firefox): bindings in isolated worlds (#6493) 2021-05-11 09:27:39 -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
Dmitry Gozman 10c76ff56f
browser(firefox): fix race between idleTasksFinishedPromise and window closure (#6308) 2021-04-23 16:05:37 -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
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
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 0167f8c182
browser(firefox): allow to override request url (#4436) 2020-11-13 14:56:27 -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
Pavel Feldman 437fe17825
browser(firefox): expose resource timing info (#4205) 2020-10-21 13:55:30 -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 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 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
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