Commit Graph

439 Commits

Author SHA1 Message Date
Andrey Lushnikov
5d8aa8d5cf
browser(firefox): fix extra HTTP headers in request interception (#11265) 2022-01-08 08:26:11 -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
Andrey Lushnikov
bff93f830e
devops: fix firefox packaging for Ubuntu 20.04 arm64 (#10962)
This was originally landed in
https://github.com/microsoft/playwright/pull/10091 but got accidentally
reverted by https://github.com/microsoft/playwright/pull/10760

References #10759
2021-12-15 18:10:26 -08:00
Andrey Lushnikov
9b488f5a65
devops(firefox): do not bootstrap firefox-release ever on MacOS (#10960)
References #10759
2021-12-15 17:14:08 -08:00
Andrey Lushnikov
acb75460bc
devops(firefox): fix packaging of mozilla-release (#10949)
`MOZ_AUTOMATION` env variable requires us to set a bunch of other
variables to package the build.
2021-12-15 11:12:44 -08:00
Andrey Lushnikov
cb79cd88a9
browser(firefox): use pre-downloaded toolchains for release builds (#10929) 2021-12-15 08:31:33 -08:00
Andrey Lushnikov
6552556608
devops: attempt to fix Firefox M95 release compilation (#10908)
Builders fail to download release toolchains; fallback to
LLVM from Homebrew on Mac.

References #10759
2021-12-14 00:49:35 -08:00
Andrey Lushnikov
2a8801be1e
browser(firefox): fix Firefox crashes (#10904)
Review URL: aff16fc8e4

This patch fixes 2 firefox crashers:
- color scheme override code was not used, but was called
  from multiple threads, which caused a weakptr use violation (cannot
  be used from multiple threads)
- snapshot listener callback was reset asynchronously, so when
  `HeadlessWindowCapturer` was destroyed, it was still occasionally
  called (see `HeadlessWindowCapturer::~HeadlessWindowCapturer`)

With this patch, I no londer experience tracing crashes in firefox.

References #10259
2021-12-13 21:23:25 -08:00
Andrey Lushnikov
c463af445f
devops: fix clobbering of firefox builds (#10867)
Turns out `mach clobber` works reliably only with a bootstrapped
checkout and fails otherwise.

Ignore failure if there's been no bootstrap since clobberring won't
change anything.
2021-12-10 13:52:25 -08:00
Andrey Lushnikov
2d386ee8e7
browser(firefox): fix proxy auth redirect + resource redirect handling (#10854)
This was breaking a vital invariant in our firefox network code - see
comments.

References #10095
2021-12-10 13:11:58 -08:00
Andrey Lushnikov
027ecd80d0
devops: fix Firefox builds on MacOS 12 (#10865)
We don't need this yet for our build bots, but I happen to run MacOS 12
now.
2021-12-10 11:46:10 -08:00
Andrey Lushnikov
00bc2ab531
browser(firefox): roll Firefox stable to M95 (#10760)
https://github.com/microsoft/playwright/issues/10759
2021-12-07 11:53:17 -08:00
Max Schmitt
08d31965c6
browser(firefox): ignore console events with attached exception (#10581) 2021-11-29 17:55:15 +01:00
Andrey Lushnikov
851c194098
browser(firefox): disable remote process for certain origins (#10269)
Fixes #10268
2021-11-11 17:43:52 -08:00
Andrey Lushnikov
ff0da94d6a chore: bump firefox BUILD_NUMBER 2021-11-11 11:38:45 -10:00
Andrey Lushnikov
0fa8073ab6
browser(firefox): fix input composition when TIP is stolen by user (#10238)
When firefox is automated + interacted with manually, input composition
might get stolen from Text Input Processor.

Re-requiring TIP every time seems to fix this.

References #5460
2021-11-11 10:23:00 -08:00
Andrey Lushnikov
9f4b0235eb
devops: fix firefox archiving scripts (#10101)
They should use absolute paths instead of relative paths.
2021-11-05 17:04:11 -07:00
Andrey Lushnikov
975a00ab31
devops: bundle vcruntime140_1.dll with Firefox builds (#10099)
We'll need to bake new Firefox build and roll onto it.

References #9974
2021-11-05 15:28:44 -07:00
Andrey Lushnikov
296a2bb72f
devops: cross-compile firefox for Ubuntu 20.04 Arm64 (#10091)
This patch adds Firefox cross-compilation from x86_64 Ubuntu 20.04 to
arm64 Ubuntu 20.04.

This patch also fixes packaging logic for Firefox to use a STRIP
command from the aarch64 toolchain.

References #7723
2021-11-05 12:15:34 -07:00
Yury Semikhatsky
091c0065ad
browser(firefox): delete response interception code (#10053) 2021-11-04 12:29:36 -07:00
Andrey Lushnikov
653e4377a0
browser(firefox): roll Firefox to M94 (#10052) 2021-11-04 11:26:20 -07:00
Yury Semikhatsky
ddda507ccd
browser(firefox): do not crash when browser window is minimized (#9951) 2021-11-01 17:11:21 -07:00
Max Schmitt
6a1e075903
fix(browser): fix downloads with nested frames (#9925) 2021-11-01 09:37:07 -07:00
Andrey Lushnikov
f19608d1de
devops: use mach clobber for clearing ff builds (#9864)
Clobbering is required when switching between native intel compilation
and firefox arm cross-compilation.
2021-10-28 13:42:18 -07:00
Yury Semikhatsky
7560f40c77
browser(firefox): set opener for popup opened from iframe (#9837) 2021-10-28 02:16:37 -07:00
Andrey Lushnikov
47d9b23949
devops: drop infra for building 32-bit windows browsers (#9834) 2021-10-27 17:20:23 -07:00
Andrey Lushnikov
18e690e234
browser(firefox): fix firefox crashes (#9563)
Fixes #9418
2021-10-15 19:37:00 -07:00
Max Schmitt
cd7dfc8448
devops: add FF debug build instructions (#9534) 2021-10-15 23:48:50 +02:00
Andrey Lushnikov
a80fa08698
devops: move Firefox and WebKit checkouts to $HOME (#9485)
This moves default Firefox and WebKit checkouts to $HOME folder,
unless browser specific env variables are specified.

In other words:
- Firefox checkouts goes to `$HOME/firefox` unless there's a
  `$FF_CHECKOUT_PATH` that specifies a custom location.
- WebKit checkout goes to `$HOME/webkit` unless there's a
  `$WK_CHECKOUT_PATH` that specifies a custom location.

With this change, all build bots will now re-use checkouts
between builds, which should speed up compilation.
2021-10-14 10:20:06 -07:00
Andrey Lushnikov
283bdb8916
browser(firefox): roll Firefox to M93 (#9487) 2021-10-13 15:49:41 -07:00
Andrey Lushnikov
d278675a62
devops: start using Xcode 13 to compile Firefox (#9401)
It didn't compile withh Xcode 12.2, but does compile with Xcode 13
locally for me.

Moving on to Xcode 13 then.
2021-10-08 13:05:32 -07:00
Andrey Lushnikov
120e919b8e
devops: move building Firefox for Mac Intel to MacOS 11 (#9383) 2021-10-07 16:23:00 -07:00
Andrey Lushnikov
3781faeaaa
chore: fix builds on Apple M1 (#9375)
Apple M1 builders are now updated to the BigSur 11.6.

This patch:
- changes build assertions to validate 11.6 operating system
- changes build archive name to have major version only
- updates `//src/utils/registry.ts` to a new archive name for M1

This affects only M1 builds for Firefox, Firefox-Beta & WebKit.
We should roll these browsers at least once before 1.16 release.
2021-10-07 13:56:08 -07:00
Max Schmitt
5953472899
devops: fix --full command in FF which installs deps (#8878)
Broken since https://github.com/microsoft/playwright/pull/8049

Previously when doing `build.sh --full` it was installing deps + building. Currently when passing `--full` it does not install the deps before, since it tries to compile before.
2021-09-13 08:01:35 -07:00
Max Schmitt
4e95448887
browser(firefox): expose encodedBodySize in requestFinished (#8835) 2021-09-10 08:41:34 -07:00
Andrey Lushnikov
2a07b353dc
browser(firefox): roll Firefox to Firefox Stable 92.0 (#8774) 2021-09-08 06:47:26 -07:00
Andrey Lushnikov
06b69f6a97
browser(firefox): disable background tasks and updater for firefox (#8773)
References #8536
2021-09-08 06:15:22 -07:00
Max Schmitt
d9eb37b0b9
browser(firefox): resolve socks DNS on server side (#8723) 2021-09-06 16:34:28 +02:00
Max Schmitt
1762f4c547
browser(firefox): expose protocolVersion in ResponseFinished (#8687) 2021-09-03 11:39:38 -07:00
Andrey Lushnikov
30b6614e5a
browser(firefox): enable SharedArrayBuffer in Firefox builds (#8610) 2021-09-01 12:27:37 +02:00
Andrey Lushnikov
16b0a96e78
chore: enhance repack-juggler (#8586)
Instead of building firefox using `//browser_patches/buid.sh ff-beta`,
one can use `//browser_patches/repack-juggler.mjs ff-beta`.

The script will download the last Playwright build, and repack
Juggler and preferences there.
2021-08-31 04:04:30 -07:00
Andrey Lushnikov
dce21f1cc5
chore: re-arrange firefox preferences (#8581)
There's a set of preferenes that's absolutely critical for juggler
to work. Keep these on top and mark them as critical.
2021-08-31 02:15:46 -07:00
Andrey Lushnikov
5901cb321d
browser(firefox): fix file chooser in iframes #8510 (#8510)
References #8016
2021-08-27 09:28:24 -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
Joel Einbinder
744a2751de
browser(firefox): disable enterprise policies (#8388) 2021-08-25 10:26:20 -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
Yury Semikhatsky
f434c41523
browser(firefox): fulfill intercepted response with empty body (#8152) 2021-08-11 14:39:49 -07:00
Andrey Lushnikov
75d77a82cc devops: fix rust firefox version 2021-08-11 16:01:52 +03:00
Andrey Lushnikov
75dfc15e62
browser(firefox): roll to new Firefox Stable M91 (#8130) 2021-08-10 17:37:57 -07:00
Yury Semikhatsky
128bf7b4d0
chore: update ff version after last commit (#8123) 2021-08-10 15:08:49 -07:00
Yury Semikhatsky
f9efc7f8a4
browser(firefox): response interception after redirects (#8107) 2021-08-10 14:43:21 -07:00
Andrey Lushnikov
b1b4d7b819
chore: quote all bash variables when used (#8066)
This way bash won't expand and post-process variable values in any way.
The changes are driven with
[`shellcheck`](https://github.com/koalaman/shellcheck)
2021-08-07 05:32:18 -07:00
Andrey Lushnikov
477ef552fb
devops(ff-beta): fix rust installation while building firefox (#8049) 2021-08-06 10:16:14 -07:00
Max Schmitt
d03a54da64
browser(firefox): revert devtools flag CLI command (#7717)
revert 786f6c4d31
2021-07-19 17:01:06 +02:00
Andrey Lushnikov
e801442f1e
browser(firefox): roll to match Firefox 90 release (#7605)
References #7583
2021-07-14 09:26:43 -07:00
Andrey Lushnikov
34777853f7
devops: enforce hard xcode version match for browser builds (#7591)
Browsers require particular xcode versions to be installed on the host
machine to produce successful build.

This patch starts using explicit xcode versions for all mac browser
builds.
2021-07-13 18:12:53 -07:00
Max Schmitt
786f6c4d31
browser(firefox): introduce auto-open-devtools-for-tabs CLI flag (#7580) 2021-07-13 18:29:35 +02:00
Yury Semikhatsky
efb21b9e9f
browser(firefox): support response interception (#7509) 2021-07-09 05:41:53 -07:00
Dmitry Gozman
fca965cb98
browser(firefox): properly handle HSTS redirects (#7391)
When Firefox decides to perform an http->https redirect based on HSTS
information, it issues an "internal" redirect and cancels the http request.

Since there is no response for the http request, we forge 307 redirect
in this case, following Chromium lead.

The relevant code is in nsHttpChannel::StartRedirectChannelToHttps.
2021-06-30 12:59:27 -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
Andrey Lushnikov
5002420a6f
chore: further enhanced repack-juggler script (#7188)
With this change, the script is now 2-stage:
- first, prepare browser build with `repack-juggler.js --prepare`
- afterwards, run the script to repack tot juggler version with the
  bubild
2021-06-16 17:32:37 -07:00
Andrey Lushnikov
bc850b9ef9
feat: enhance repack-juggler.js to autodetect current platform (#7183)
This steals some parts of `//src/util/registry.ts`.
2021-06-16 15:13:51 -07:00
Andrey Lushnikov
04de4ad93e
devops: cleanup browser build configs (#7180)
- certain builds weren't listed in EXPECTED_BUILDS
- wekbit had one unused build configuration
2021-06-16 12:22:33 -07:00
Andrey Lushnikov
58878b584a
devops: introduce repack-juggler script (#7092)
This patch adds a new script -
`//browser_patches/firefox/repack-juggler.mjs`

This script lets you test Firefox changes if they are Juggler-specific
without firefox checkout / compilation.

The `repack-juggler.mjs` script does the following:
- downloads the latest build of Firefox-with-juggler
- finds an `omni.ja` file with Juggler files inside
- replaces juggler in omni.ja with the current juggler files in the index
2021-06-15 01:08:13 -07:00
Max Schmitt
9b9091b3fe
browser(firefox): fixed Array.prototype.toJSON workaround (#7018)
References #7015
2021-06-10 17:21:20 -07:00
Max Schmitt
226159defc
browser(firefox): forced-colors media query emulation (#6902) 2021-06-09 01:00:15 +02:00
Andrey Lushnikov
12d8c54e99
chore: swap firefox-stable and firefox (#6950)
With this patch:
- `//browser_patches/firefox` becomes firefox-stable
- `//browser_patches/firefox-stable` becomes firefox-beta

References #6817
2021-06-07 17:05:51 -07:00
Yury Semikhatsky
f60b79a311
browser(firefox): do not use Array.prototype.toJSON for serialization (#6767) 2021-05-26 15:38:53 -07:00
Andrey Lushnikov
08773e836b
browser(firefox-beta): roll Firefox to 89.0b15 (#6689) 2021-05-20 15:29:00 -07:00
Max Schmitt
b2b45afc22
browser(firefox): override reduced motion no-preference (#6683) 2021-05-20 21:07:39 +02:00
Joel Einbinder
2f9b057525
browser(firefox): partially revert scrollbars patch (#6670) 2021-05-19 18:59:57 -07:00
Max Schmitt
277eca1b98
devops: install all FF system dependencies with --full on build (#6657)
Before that it actually didn't install all needed dependencies and failed after that when starting the compiler suite. WebKit also installs dependencies with apt, so it should be fine to install them on OS level.
2021-05-19 15:16:33 -07: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
Andrey Lushnikov
d02472a9e0
browser(firefox): fix uploads of large files in Firefox (#6547)
- to read post data of requests, we have to read stream
- to restore the stream later on, we have to rewind it back
- however, if the stream is large enough, it cannot be rewound back

This patch starts cloning post data streams if possible to avoid
back-rewinding them later on.

References #4704
2021-05-12 16:27:53 -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
8d21b12454
browser(firefox): fit screencast images into given frame (#6495) 2021-05-10 22:01:41 -07:00
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
Andrey Lushnikov
b1f80bad39
browser(firefox-beta): roll Firefox to v89.0b9 (May 6, 2021) (#6443) 2021-05-06 11:03:58 -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
Andrey Lushnikov
4e0e13cf05
browser(firefox-beta): roll Firefox to beta 89.0b8 - May 2, 2021 (#6397) 2021-05-04 00:45:07 -07:00
Andrey Lushnikov
6c04b82256
browser(firefox-beta): roll @ beta Apr 29, 2021 - v89.0b6 (#6368) 2021-04-29 16:37:45 -07:00
Yury Semikhatsky
b0fae0f831
browser(firefox): merge FrameData into Frame (#6365) 2021-04-29 15:09:10 -07:00
Andrey Lushnikov
f4b8c3a848
browser(firefox): disable proton UI for now (#6327)
The new Proton UI breaks certain screencast tests. Disable
this for now.
2021-04-26 10:59:12 -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
09c35adbd5
browser(firefox): roll firefox-beta to Apr 20, 2021 - version 89.0b2 (#6247) 2021-04-20 13:27:57 -07:00
Andrey Lushnikov
4bec81b111
browser(firefox): roll Firefox to beta @ Apr 6, 2021 (#6111) 2021-04-06 17:25:18 -07:00
Andrey Lushnikov
2c6c816a41
devops: add firefox-ubuntu-20.04 as expected build (#6063) 2021-04-02 21:37:12 -07:00
Joel Einbinder
2357f0b562
browser(firefox): fix bootstrap on bots with --no-interactive (#6047)
The command --no-interactive moved and broke our build. See https://bugzilla.mozilla.org/show_bug.cgi?id=1695272
2021-04-02 07:52:42 -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