aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'community/chromium')
-rw-r--r--community/chromium/APKBUILD437
-rw-r--r--community/chromium/broken-dcheck.patch11
-rw-r--r--community/chromium/chromium.desktop2
-rw-r--r--community/chromium/default-pthread-stacksize.patch11
-rw-r--r--community/chromium/disable-floc-component.patch15
-rw-r--r--community/chromium/fix-missing-includes.patch10
-rw-r--r--community/chromium/fix-unittests-base.patch56
-rw-r--r--community/chromium/fix-unittests-net-py2tests.patch1023
-rw-r--r--community/chromium/fix-unittests-net.patch259
-rw-r--r--community/chromium/fix-unittests-sandbox.patch11
-rw-r--r--community/chromium/gdbinit.patch21
-rw-r--r--community/chromium/llvm10-compat.patch93
-rw-r--r--community/chromium/missing-includes.patch40
-rw-r--r--community/chromium/musl-fixes.patch78
-rw-r--r--community/chromium/musl-hacks.patch71
-rw-r--r--community/chromium/no-execinfo.patch28
-rw-r--r--community/chromium/no-mallinfo.patch42
-rw-r--r--community/chromium/quiche-arena-size.patch11
-rw-r--r--community/chromium/remove-unsupported-attribute.patch27
-rw-r--r--community/chromium/renamed-freetype-member.patch35
-rw-r--r--community/chromium/resolver.patch24
-rw-r--r--community/chromium/revert-2778794.patch14
-rw-r--r--community/chromium/scoped-file.patch31
-rw-r--r--community/chromium/strip-binary.patch20
-rw-r--r--community/chromium/v8-constexpr.patch11
25 files changed, 2127 insertions, 254 deletions
diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD
index a407b300bb..5a3eed900f 100644
--- a/community/chromium/APKBUILD
+++ b/community/chromium/APKBUILD
@@ -1,24 +1,24 @@
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=chromium
-pkgver=88.0.4324.182
+pkgver=92.0.4515.107
pkgrel=0
pkgdesc="Chromium web browser"
url="https://www.chromium.org/Home"
-arch="x86_64 aarch64" # x86: ./v8_context_snapshot_generator segfaults
- # armv7: /usr/bin/ld: final link failed: memory exhausted when linking chrome
+arch="aarch64 x86_64" # x86: ./v8_context_snapshot_generator segfaults
license="BSD-3-Clause"
makedepends="
alsa-lib-dev
bash
- binutils-gold
bison flex
bsd-compat-headers
bzip2-dev
cairo-dev
clang-dev
cups-dev
+ curl-dev
dbus-glib-dev
+ elfutils
elfutils-dev
eudev-dev
ffmpeg-dev
@@ -55,16 +55,17 @@ makedepends="
libxscrnsaver-dev
libxslt-dev
linux-headers
+ lld
mesa-dev
minizip-dev
ninja
nodejs
nss-dev
- openjdk8
+ java-jdk
opus-dev
pciutils-dev
perl
- python2
+ python3
re2-dev
snappy-dev
speex-dev
@@ -76,10 +77,10 @@ makedepends="
"
# explicit depends for --headless
depends="xdg-utils eudev-libs ttf-opensans"
-options="suid"
-subpackages="$pkgname-chromedriver"
+options="suid !check" # broken
+subpackages="$pkgname-chromedriver $pkgname-lang $pkgname-swiftshader $pkgname-angle"
source="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
- pstables-2.8.h::https://git.savannah.gnu.org/cgit/freetype/freetype2.git/plain/src/psnames/pstables.h?h=VER-2-8
+ test_fonts-cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb.tar.gz::https://chromium-fonts.storage.googleapis.com/cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb
chromium-launcher.sh
chromium.conf
chromium.desktop
@@ -107,12 +108,164 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom
aarch64-fixes.patch
elf-arm.patch
- broken-dcheck.patch
- llvm10-compat.patch
- missing-includes.patch
+ remove-unsupported-attribute.patch
+ fix-missing-includes.patch
+ revert-2778794.patch
+
+ disable-floc-component.patch
+
+ fix-unittests-base.patch
+ fix-unittests-sandbox.patch
+ fix-unittests-net.patch
+ fix-unittests-net-py2tests.patch
+ scoped-file.patch
+ strip-binary.patch
+ gdbinit.patch
+ v8-constexpr.patch
+ quiche-arena-size.patch
+ renamed-freetype-member.patch
"
# secfixes:
+# 92.0.4515.107-r0:
+# - CVE-2021-30565
+# - CVE-2021-30566
+# - CVE-2021-30567
+# - CVE-2021-30568
+# - CVE-2021-30569
+# - CVE-2021-30571
+# - CVE-2021-30572
+# - CVE-2021-30573
+# - CVE-2021-30574
+# - CVE-2021-30575
+# - CVE-2021-30576
+# - CVE-2021-30577
+# - CVE-2021-30578
+# - CVE-2021-30579
+# - CVE-2021-30580
+# - CVE-2021-30581
+# - CVE-2021-30582
+# - CVE-2021-30583
+# - CVE-2021-30584
+# - CVE-2021-30585
+# - CVE-2021-30586
+# - CVE-2021-30587
+# - CVE-2021-30588
+# - CVE-2021-30589
+# 91.0.4472.164-r0:
+# - CVE-2021-30559
+# - CVE-2021-30541
+# - CVE-2021-30560
+# - CVE-2021-30561
+# - CVE-2021-30562
+# - CVE-2021-30563
+# - CVE-2021-30564
+# 91.0.4472.114-r0:
+# - CVE-2021-30554
+# - CVE-2021-30555
+# - CVE-2021-30556
+# - CVE-2021-30557
+# 91.0.4472.101-r0:
+# - CVE-2021-30544
+# - CVE-2021-30545
+# - CVE-2021-30546
+# - CVE-2021-30547
+# - CVE-2021-30548
+# - CVE-2021-30549
+# - CVE-2021-30550
+# - CVE-2021-30551
+# - CVE-2021-30552
+# - CVE-2021-30553
+# 91.0.4472.77-r0:
+# - CVE-2021-30521
+# - CVE-2021-30522
+# - CVE-2021-30523
+# - CVE-2021-30524
+# - CVE-2021-30525
+# - CVE-2021-30526
+# - CVE-2021-30527
+# - CVE-2021-30528
+# - CVE-2021-30529
+# - CVE-2021-30530
+# - CVE-2021-30531
+# - CVE-2021-30532
+# - CVE-2021-30533
+# - CVE-2021-30534
+# - CVE-2021-30535
+# - CVE-2021-30536
+# - CVE-2021-30537
+# - CVE-2021-30538
+# - CVE-2021-30539
+# - CVE-2021-30540
+# 90.0.4430.72-r0:
+# - CVE-2021-21201
+# - CVE-2021-21202
+# - CVE-2021-21203
+# - CVE-2021-21204
+# - CVE-2021-21205
+# - CVE-2021-21221
+# - CVE-2021-21207
+# - CVE-2021-21208
+# - CVE-2021-21209
+# - CVE-2021-21210
+# - CVE-2021-21211
+# - CVE-2021-21212
+# - CVE-2021-21213
+# - CVE-2021-21214
+# - CVE-2021-21215
+# - CVE-2021-21216
+# - CVE-2021-21217
+# - CVE-2021-21218
+# - CVE-2021-21219
+# 89.0.4389.128-r0:
+# - CVE-2021-21206
+# - CVE-2021-21220
+# 89.0.4389.114-r0:
+# - CVE-2021-21194
+# - CVE-2021-21195
+# - CVE-2021-21196
+# - CVE-2021-21197
+# - CVE-2021-21198
+# - CVE-2021-21199
+# 89.0.4389.90-r0:
+# - CVE-2021-21191
+# - CVE-2021-21192
+# - CVE-2021-21193
+# 89.0.4389.72-r0:
+# - CVE-2021-21158
+# - CVE-2021-21159
+# - CVE-2021-21160
+# - CVE-2021-21161
+# - CVE-2021-21162
+# - CVE-2021-21163
+# - CVE-2021-21164
+# - CVE-2021-21165
+# - CVE-2021-21166
+# - CVE-2021-21167
+# - CVE-2021-21168
+# - CVE-2021-21169
+# - CVE-2021-21170
+# - CVE-2021-21171
+# - CVE-2021-21172
+# - CVE-2021-21173
+# - CVE-2021-21174
+# - CVE-2021-21175
+# - CVE-2021-21176
+# - CVE-2021-21177
+# - CVE-2021-21178
+# - CVE-2021-21179
+# - CVE-2021-21180
+# - CVE-2020-27844
+# - CVE-2021-21181
+# - CVE-2021-21182
+# - CVE-2021-21183
+# - CVE-2021-21184
+# - CVE-2021-21185
+# - CVE-2021-21186
+# - CVE-2021-21187
+# - CVE-2021-21188
+# - CVE-2021-21189
+# - CVE-2021-21190
# 83.0.4103.116-r0:
# - CVE-2020-6505
# - CVE-2020-6506
@@ -121,21 +274,30 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom
# 72.0.3626.121-r0:
# - CVE-2019-5786
+if [ -n "$CHECK" ]; then
+ options="suid"
+fi
+
if [ -n "$DEBUG" ]; then
_buildtype=Debug
_is_debug=true
+ _symbol_level=1
+ _is_component_build=true
else
_buildtype=Release
_is_debug=false
+ _symbol_level=0
+ _is_component_build=false
fi
prepare() {
- cd "$srcdir"
patch_args="-p0"
default_prepare
cd "$srcdir"/"chromium-$pkgver"
+ mv ../test_fonts/ ./third_party/test_fonts/
+
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
touch chrome/test/data/webui/i18n_process_css_test.html
# Use the file at run time instead of effectively compiling it in
@@ -177,7 +339,7 @@ prepare() {
done
msg "Replacing gn files"
- python2 build/linux/unbundle/replace_gn_files.py --system-libraries \
+ python3 build/linux/unbundle/replace_gn_files.py --system-libraries \
$use_system
third_party/libaddressinput/chromium/tools/update-strings.py
@@ -196,22 +358,14 @@ build() {
eval "$(base64 -d < $srcdir/google-api.keys)"
msg "Bootstrapping GN"
- local _c=$(_gn_flags is_clang=true \
- use_sysroot=false \
- treat_warnings_as_errors=false \
- fatal_linker_warnings=false \
- use_custom_libcxx=false \
- use_gold=false \
- use_allocator=\"none\" \
- use_allocator_shim=false \
- use_vaapi=true \
- )
# AR="ar" CC="${CC:-gcc}" CXX="${CXX:-g++}" LD="${CXX:-g++}" \
CC="${CC:-clang}" CXX="${CXX:-clang++}" LD="${CXX:-clang++}" \
- python2 tools/gn/bootstrap/bootstrap.py -s -v --gn-gen-args "$_c"
+ python3 tools/gn/bootstrap/bootstrap.py -s -v --skip-generate-buildfiles
msg "Configuring build"
+
+ local _c _ca
_c=$(_gn_flags \
blink_symbol_level=0 \
clang_use_chrome_plugins=false \
@@ -230,10 +384,10 @@ build() {
host_toolchain=\"//build/toolchain/linux/unbundle:default\" \
icu_use_data_file=true \
is_clang=true \
- is_component_build=false \
+ is_component_build=$_is_component_build \
is_debug=$_is_debug \
proprietary_codecs=true \
- symbol_level=0 \
+ symbol_level=$_symbol_level \
treat_warnings_as_errors=false \
use_allocator_shim=false \
use_allocator=\"none\" \
@@ -241,7 +395,7 @@ build() {
use_custom_libcxx=false \
use_gnome_keyring=false \
use_gold=false \
- use_lld=false \
+ use_lld=true \
use_pulseaudio=false \
use_sysroot=false \
use_system_harfbuzz=true \
@@ -252,8 +406,15 @@ build() {
use_system_libpng=true \
use_system_lcms2=true \
use_system_zlib=true \
+ build_with_tflite_lib=false \
+ enable_vr=false \
)
+ case $CARCH in
+ x86*|aarch64) _ca="use_vaapi=true" ;;
+ *) _ca="concurrent_links=1" ;;
+ esac
+
AR="ar" CC="clang" CXX="clang++" LD="clang++" NM=/usr/bin/nm \
out/Release/gn gen out/$_buildtype --args="$_c $_ca"
@@ -277,24 +438,138 @@ build() {
# finish rest of the build
ninja -C out/$_buildtype chrome chrome_sandbox chromedriver
+
+ if [ -n "$CHECK" ]; then
+ ninja -C out/$_buildtype \
+ base_unittests \
+ base_util_unittests \
+ sandbox_linux_unittests \
+ chromedriver_unittests \
+ crypto_unittests \
+ skia_unittests \
+ blink_common_unittests \
+ ozone_unittests \
+ ozone_x11_unittests \
+ ozone_gl_unittests \
+ absl_hardening_tests \
+ # angle_unittests \
+ blink_common_unittests \
+ blink_heap_unittests \
+ # blink_platform_unittests \
+ boringssl_crypto_tests \
+ boringssl_ssl_tests \
+ cast_unittests \
+ capture_unittests \
+ # components_browsertests \
+ # components_unittests \
+ # content_browsertests \
+ # content_unittests \
+ # crashpad_tests \
+ events_unittests \
+ gcm_unit_tests \
+ gin_unittests \
+ google_apis_unittests \
+ gpu_unittests \
+ gwp_asan_unittests \
+ ipc_tests \
+ jingle_unittests \
+ latency_unittests \
+ libjingle_xmpp_unittests \
+ liburlpattern_unittests \
+ media_blink_unittests \
+ media_unittests \
+ midi_unittests \
+ mojo_unittests \
+ net_unittests \
+ # cc_unittests \
+ # blink_unittests \
+ perfetto_unittests \
+ # services_unittests \
+ shell_dialogs_unittests \
+ sql_unittests \
+ storage_unittests \
+ ui_base_unittests \
+ ui_touch_selection_unittests \
+ url_unittests \
+ # webkit_unit_tests \
+ wtf_unittests \
+ zlib_unittests
+ fi
}
-package() {
- cd out/$_buildtype
- local bin pak
- for bin in chrome chromedriver *.bin; do
- install -Dm755 $bin "$pkgdir"/usr/lib/$pkgname/$bin
- done
+check() {
+ out/$_buildtype/base_unittests
+ out/$_buildtype/base_util_unittests
+ out/$_buildtype/sandbox_linux_unittests # broken + does not compile
+ out/$_buildtype/chromedriver_unittests
+ out/$_buildtype/crypto_unittests
+ out/$_buildtype/skia_unittests
+ out/$_buildtype/ozone_unittests
+ out/$_buildtype/ozone_x11_unittests # ?
+ out/$_buildtype/ozone_gl_unittests # broken
+ out/$_buildtype/absl_hardening_tests
+ # out/$_buildtype/angle_unittests # broken / does not compile
+ out/$_buildtype/blink_common_unittests
+ out/$_buildtype/blink_heap_unittests
+ # out/$_buildtype/blink_platform_unittests # broken / does not compile
+ out/$_buildtype/boringssl_crypto_tests
+ out/$_buildtype/boringssl_ssl_tests
+ out/$_buildtype/cast_unittests
+ out/$_buildtype/capture_unittests --gtest_filter=-*UsingRealWebcam* # broken
+ # out/$_buildtype/components_browsertests # broken / does not compile
+ # out/$_buildtype/components_unittests # broken / does not compile
+ # out/$_buildtype/content_browsertests # broken / does not compile
+ # out/$_buildtype/content_unittests # broken / does not compile
+ # out/$_buildtype/crashpad_tests # broken / does not compile
+ out/$_buildtype/events_unittests
+ out/$_buildtype/gcm_unit_tests
+ out/$_buildtype/gin_unittests # ?
+ out/$_buildtype/google_apis_unittests
+ out/$_buildtype/gpu_unittests
+ out/$_buildtype/gwp_asan_unittests # broken / required?
+ out/$_buildtype/ipc_tests
+ out/$_buildtype/jingle_unittests
+ out/$_buildtype/latency_unittests
+ out/$_buildtype/libjingle_xmpp_unittests
+ out/$_buildtype/liburlpattern_unittests
+ out/$_buildtype/media_blink_unittests # broken
+ out/$_buildtype/media_unittests # broken
+ out/$_buildtype/midi_unittests
+ out/$_buildtype/mojo_unittests
+ out/$_buildtype/net_unittests # broken
+ # out/$_buildtype/cc_unittests # broken / does not compile
+ # out/$_buildtype/blink_unittests # broken / does not compile
+ out/$_buildtype/perfetto_unittests # ?
+ # out/$_buildtype/services_unittests # broken / does not compile
+ out/$_buildtype/shell_dialogs_unittests
+ out/$_buildtype/sql_unittests
+ out/$_buildtype/storage_unittests
+ out/$_buildtype/ui_base_unittests # ok
+ out/$_buildtype/ui_touch_selection_unittests
+ out/$_buildtype/url_unittests
+ # out/$_buildtype/webkit_unit_tests # broken / does not compile
+ out/$_buildtype/wtf_unittests
+ out/$_buildtype/zlib_unittests
+}
- install -Dm755 swiftshader/libEGL.so "$pkgdir"/usr/lib/$pkgname/swiftshader/libEGL.so
- install -Dm755 swiftshader/libGLESv2.so "$pkgdir"/usr/lib/$pkgname/swiftshader/libGLESv2.so
+package() {
+ cd "$builddir"/out/$_buildtype
+ # binaries
+ install -Dm755 chrome "$pkgdir"/usr/lib/$pkgname/chrome
install -Dm4755 chrome_sandbox "$pkgdir"/usr/lib/$pkgname/chrome-sandbox
+ install -Dm755 crashpad_handler "$pkgdir"/usr/lib/$pkgname/crashpad_handler
+
+ # resources
+ install -Dm644 snapshot_blob.bin "$pkgdir"/usr/lib/$pkgname/
+ install -Dm644 v8_context_snapshot.bin "$pkgdir"/usr/lib/$pkgname/
+
install -m644 icudtl.dat "$pkgdir"/usr/lib/$pkgname/icudtl.dat
install -Dm755 xdg-mime "$pkgdir"/usr/lib/$pkgname/xdg-mime
install -Dm755 xdg-settings "$pkgdir"/usr/lib/$pkgname/xdg-settings
+ local pak
for pak in *.pak; do
install -Dm644 $pak "$pkgdir"/usr/lib/$pkgname/$pak
done
@@ -302,15 +577,15 @@ package() {
install -Dm755 "$srcdir"/chromium-launcher.sh \
"$pkgdir"/usr/lib/$pkgname/chromium-launcher.sh
- cp -a locales "$pkgdir"/usr/lib/$pkgname/
cp -a MEIPreload "$pkgdir"/usr/lib/$pkgname/
+ # Default to en-us and provide everything else through the chromium-lang package
+ install -Dm644 locales/en-US.pak "$pkgdir"/usr/lib/$pkgname/locales/en-US.pak
+
# It is important that we name the target "chromium-browser",
# xdg-utils expect it; bug #355517.
mkdir -p "$pkgdir"/usr/bin
- cd "$pkgdir"/usr/bin
- ln -sf /usr/lib/$pkgname/chromium-launcher.sh chromium-browser
- ln -sf /usr/lib/$pkgname/chromedriver "$pkgdir"/usr/bin/
+ ln -sf /usr/lib/$pkgname/chromium-launcher.sh "$pkgdir"/usr/bin/chromium-browser
install -Dm644 "$srcdir"/chromium.conf \
"$pkgdir"/etc/chromium/chromium.conf
@@ -332,27 +607,67 @@ package() {
chromedriver() {
pkgdesc="WebDriver driver for the Chromium Browser"
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ cd "$builddir"/out/$_buildtype
+
mkdir -p "$subpkgdir"/usr/lib/$pkgname "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/lib/$pkgname/chromedriver \
- "$subpkgdir"/usr/lib/$pkgname/
- mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin
+
+ install -Dm755 chromedriver "$subpkgdir"/usr/lib/$pkgname/chromedriver
+ ln -sf /usr/lib/$pkgname/chromedriver "$subpkgdir"/usr/bin/
+}
+
+lang() {
+ pkgdesc="Languages for package $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel lang"
+
+ cd "$builddir"/out/$_buildtype
+
+ for pak in locales/*.pak; do
+ install -Dm644 "$pak" "$subpkgdir"/usr/lib/$pkgname/"$pak"
+ done;
+
+ rm "$subpkgdir"/usr/lib/$pkgname/locales/en-US.pak
+}
+
+swiftshader() {
+ pkgdesc="Chromium web browser: CPU-based implementation of the Vulkan graphics API"
+ depends="$pkgname-angle=$pkgver-r$pkgrel"
+
+ cd "$builddir"/out/$_buildtype
+
+ install -Dm755 swiftshader/libEGL.so \
+ "$subpkgdir"/usr/lib/$pkgname/swiftshader/libEGL.so
+ install -Dm755 swiftshader/libGLESv2.so \
+ "$subpkgdir"/usr/lib/$pkgname/swiftshader/libGLESv2.so
+}
+
+angle() {
+ pkgdesc="Chromium web browser: ANGLE based hardware acceleration"
+ depends=""
+
+ cd "$builddir"/out/$_buildtype
+
+ install -Dm755 libEGL.so "$subpkgdir"/usr/lib/$pkgname/libEGL.so
+ install -Dm755 libGLESv2.so "$subpkgdir"/usr/lib/$pkgname/libGLESv2.so
}
-sha512sums="ce8d507645e937107847199b55287ec5522e778851367a19c4cfa4ff5fae18e7c7ea999aa7b0ad0758fab68a003f201bf38ae51e3642388705de2ada9be87730 chromium-88.0.4324.182.tar.xz
-a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h
+sha512sums="
+8814a3371e38836cee02178fa06bee612d00efe561791278351ef5312f5225742d416043fe6e25e9e353ae3d82dbd5ef57c9b1f115423da6537288e9aece779a chromium-92.0.4515.107.tar.xz
+f554ccc5d8a5c066634357878c89944cc591809ea6f6c6ef5b35e970e9674e0b3be8fddb06c0d333ddc65211fa09ae5e0b4b483ca70048156c29607c5487c017 test_fonts-cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb.tar.gz
b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh
f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf
-be4cf2c37fe0ae7bbab53aacb1d3956c22f2b94671879ff4a6c9fa65e021345f168befe3e159704c0c2d281de5c66859d24be4016beec3090f7ef752a93376f3 chromium.desktop
+e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b370fb69446892c69e5967a4be76082325c14245ee7915234c chromium.desktop
2d8237a940ea691bd10b08315429677a587f7ef9692a0cca53bfd066eae82998a6c71f402a8669e9de39f94d7f3280745d1628ea6eac5d76ca7116844d4e0dac google-api.keys
-b726ef2ecfe7d471e60d67de1e05847d214df6093b41bb2055652a9028327af19a8b10e7175467240f4dfec9e3ae97a6c4666bfd2cd6cb436c54656a085653ae default-pthread-stacksize.patch
-a5969b1e71d141521fe2b9848660580ce93f6b5d51271bc287e6f98ea8bf55501d73e01b1adc9327d316498d4e7f82f53eda67a2561a59e5c26388957904f1e7 musl-fixes.patch
+fc1d31cf7a502cfbfa21df770e6abe7f8c0930209cbda7c250fa5a38cb3f3941a0652fc12462083840cc05881224afecf3dd637a0590222e82145387c09e653d default-pthread-stacksize.patch
+838debc14136707cb4209d5e00484392bcb06639a435c2d13e4062587cbe903ad851c9eba64c2b93263b5ed7b9e1eebec7565c844d59af74689fc0bf9138eabb musl-fixes.patch
e8675aff9fccd8b58cc839ef1d9e0e022d66aa94f72baa72e7acf92ceb2691f6a7907cc60ec3a87f894efdd639a3dec7fe702c97d446fcdea99452caec57e002 musl-fixes-breakpad.patch
-2d27aa2ee872fb9667215e0bbf0b0c7714d87cf632ca888926765509c3a5cfc5a615cc8a39cdb47b2928a2734dc16cccbbf8f83b95f72e05dfc034dbf08db9e9 musl-hacks.patch
+798ed4cd9b6a1113200e5ad91073f6affebc66ed8c1bd56bc87ffbacf3117ee1fedd41889d75a2853291c01dfcc2e942b88a41209454fa359fc585b3cc2d906f musl-hacks.patch
919f13a2cd65673f267321cf95c5410e65bc5264d6704d0791b25d39111282bedb425bd9824dde3b67422cfb874c86a9383ded686e39cfd4aac239edaf41cfc8 musl-libc++.patch
ef43fa90b05e2407b6daa822193121cdeef6ee9068175572f0928f156f186be9c77539dfa06863adfaa25afd498ec1b5081f9e476543616f9472b9033fd921dc musl-sandbox.patch
-883dfae96f42a4b4182e280dfb3309faabd3c593aaa4e0814d887b585024e00a49b20fc8268f482a44ec7f524005796542aacb5fdeff8ede2f9a1f738d2dd4f2 no-execinfo.patch
-f4b3f8bf93201f6053cae2a824d011c205e8882c9ef560b5ed4b727c2fc27e8e38aa18f606308f09b1dc14ee4b6e9fecdde728c20a5796a4fc7c77c214d636a3 no-mallinfo.patch
-f60c89076bbc458e2e38d9dad26027f9604179fd59e0c2b988a86340b9ef78a4c346c84ac3e7e4e70badaff69d71edf49d7b9030e5fadb96afde4f977a98c412 resolver.patch
+1762308e6d378fa299c841785405895545a44f71d78cd30500b0d220108d9748f2b4bb4200a82a96638ab380b8ef96bb02fe97c4092f510e20c320e4909447c6 no-execinfo.patch
+f71136150dc840d63b986c18e63e198b21c94f30f95762a1857ce5ce65c682199a8a309f83d7657fb8913f31ca304ac80a2e599b3f4645cf63e10decc2acc561 no-mallinfo.patch
+3a7810105c45c84563efb6c739d9fff8c3645ae70a168b2c47aa375c4d6960ba4287e339243cb8ec50809522ab40f57d8cc6f471ff4390b8aa747cc1a7af65aa resolver.patch
f4265df7532625070c51ac43466e3e0f21e696f90c3b6040ef62a21defa7666203ff8219d9c9a5bebc011024aff300fbcbd941cebd0df59c4bc068d8f290221e swiftshader.patch
cf9970ef403ff7a68bf08c0ba5e681eec459fcb1afb6859e5a80f4874f1b9a656377b4540eeb5208ddec570efa206f147e32718c687fa29ca3acc4fde6e8cbe8 chromium-use-alpine-target.patch
599f5ef338b5797e04436bdc88921c31365d2dea2613d40053be6e774f654e2889efb0c0bd55c2c5044a6805510fbc337da555971169a75d584fac93e18256ac media-base.patch
@@ -363,6 +678,18 @@ cf9970ef403ff7a68bf08c0ba5e681eec459fcb1afb6859e5a80f4874f1b9a656377b4540eeb5208
ad4ddc25df7aa1de2038b7adb86d27679ecdb7e3e16c0eec994e947a08c41504b6fb41166f7868ff5f58ce8191c78800cbb91d259c864840fa5af1d7ba5d43a1 gcc-arm.patch
cc67d2a77910663e5a1ad5f66606ee2544867aa1fef25e1a1bc355a8db765d5928edb72f158e6a2ece4195c9b62b875dcdcab4e4055e7611edab405e8cfd658e aarch64-fixes.patch
9b1441fe42421ef9ead86a5143bf997d989bd53a8969cdfdf4e0c45f847efc8c1d127e15fb05e2ef5dbefbb228cbdc2849404d74997ca56265599e12e5efd6e4 elf-arm.patch
-e54adfc8c48a47591cf329882167d16180701ec0703162c8691378d59199364b1cdcf9248f1ebd33d4873dd15bda44eeb67c20185b6fd0e9d4c9b08152ad912a broken-dcheck.patch
-f53d955ef5035012801bd8706b05385de1bc5f3ee56878951583c6af688c2ecd9411dd6bf91e648ab0a1ce7fe6429afb0be1a3c2fee6dc29fa8b499c65276fba llvm10-compat.patch
-765337d20fc6d805df896ec49c26c63b9d97810b474514c7c9d67739441fc57d5376f71338dac124e1fc7fc7d9fc8d2fff63bfebad8a6ed99d8e5991da7ea1a1 missing-includes.patch"
+51fabfc4725ab13f626653c1cc91a70df5e60477351ac1fe7f94bc9f1b1f8fb32d984ba4657f0384f53de620b7dd4aa154c6f2f104c4c42fcfe2f9721ba5ea1f remove-unsupported-attribute.patch
+f924539cd1bb8ee87f5dfb5acc6dc33a653b58d96d3b581dc7ab76489775ce0c39a2c9c541d25c6df142225344fe7932c81ec8d015e21eac03658abf7838fae4 fix-missing-includes.patch
+2f976087c7f9b685d7526c6ccfe662ba642189b5044224e662e6965d9dfa5ba5b96f8bb7ebef1cb225356e7f63427288b42f12e9842d432164de9ac74642805a revert-2778794.patch
+f2291a1fb233615cf0eb2e1fac61307a8e6dc1981eb60f3f4f91e4318dfbc2ce8d96660cd355d397882b06fe4d66a091247c9affc30e19d17190cfe3ac155352 disable-floc-component.patch
+2d9ec3dcdcef25cdeba5550870b8568d5b4bf210ec42d5726493c4c0aa5ded3f685b1497769a4607ada8f397a366841e47a41152a39df6fac1c7c2a0ed160571 fix-unittests-base.patch
+54f07ee9d85577e284e04460e79132fa6769251ceb045561cea811dde0369e9e4cdbcf26566235b0d12c649be4d46fea294f7c6a4e2a75109dc3282e6e7d7993 fix-unittests-sandbox.patch
+805319867214c997a262b0eee161c2efe9f46420b2d244083f186977c7ffa413526161682759fbfcc7bb5845bcf9624557c2f496dc560bd4d85ab71a9e47c305 fix-unittests-net.patch
+94d48612e98063f0b4589aadbc74d681170c0672df643d7e97485e947c92bf8437e7962323dc2940a4a36b7dcb009ed25d58654877e04644c13f9a9bd13ba99c fix-unittests-net-py2tests.patch
+8d11b2ba811fdd6280784bfafcef073238324941b4c33e7c9a5ccfde8506242d06e5136d697f047bab3838b43a666f1da404af7b4f4ff9a0c6bf6bdb8448e5b2 scoped-file.patch
+7ab510eb458c5e736237c8b0251b13677d78653c75cc693e54d0885695ce8578f65b5f96b95886c3993dcfa6987eac0c9f90309545b701005a8da20261033496 strip-binary.patch
+b2684e64c7fc248ab8ddbd942326353ecfa2fa4195d2b96434d9dae52e11dadb8d81f0ecc740d13232fd73324318d8b4831ea08ce788106ec762e53df545e743 gdbinit.patch
+7fcba58f38adbaa394efbfa8fe387c91e79950e4e6b9dbe32064a57fa031457020ed4003376a9af582584f2d20f07d3a40e8b546e9c2b3b01b8d9eda8b5a9d74 v8-constexpr.patch
+40376e87971b5870dc1bb63121c67a0b78d88564a961d50ffd5da887b9e0989423fe266544bbafae885cd4e827caa333bb42c883572b9cca808098fe374c8c5c quiche-arena-size.patch
+907afc4823bc58c83751005a2da0f0d264f4b80beba8031b58e6faf4fcb7dbd1b341409ba8b4a95291e5fa964f28f54f9f08ddb015ea368516abef059f14fb4c renamed-freetype-member.patch
+"
diff --git a/community/chromium/broken-dcheck.patch b/community/chromium/broken-dcheck.patch
deleted file mode 100644
index 68160b2ec8..0000000000
--- a/community/chromium/broken-dcheck.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cc/metrics/compositor_frame_reporter.cc.orig
-+++ cc/metrics/compositor_frame_reporter.cc
-@@ -671,7 +671,7 @@
-
- void CompositorFrameReporter::ReportEventLatencyHistograms() const {
- for (const auto& event_metrics : events_metrics_) {
-- DCHECK_NE(event_metrics, nullptr);
-+ DCHECK_EQ(event_metrics != nullptr, true);
- const std::string histogram_base_name =
- GetEventLatencyHistogramBaseName(*event_metrics);
- const int event_type_index = static_cast<int>(event_metrics->type());
diff --git a/community/chromium/chromium.desktop b/community/chromium/chromium.desktop
index f92e198984..e5f549bc02 100644
--- a/community/chromium/chromium.desktop
+++ b/community/chromium/chromium.desktop
@@ -2,7 +2,7 @@
Name=Chromium
GenericName=Web Browser
Comment=Access the Internet
-Exec=chromium-browser --use-gl=desktop %U
+Exec=chromium-browser %U
Terminal=false
Icon=chromium
Type=Application
diff --git a/community/chromium/default-pthread-stacksize.patch b/community/chromium/default-pthread-stacksize.patch
index e55317035d..5cffaa223c 100644
--- a/community/chromium/default-pthread-stacksize.patch
+++ b/community/chromium/default-pthread-stacksize.patch
@@ -10,6 +10,17 @@
#else
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
// default stack size isn't enough for some browser tests.
+--- ./base/threading/platform_thread_unittest.cc.orig
++++ ./base/threading/platform_thread_unittest.cc
+@@ -411,7 +411,7 @@
+ ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && \
+ !defined(THREAD_SANITIZER)) || \
+ (defined(OS_ANDROID) && !defined(ADDRESS_SANITIZER))
+- EXPECT_EQ(0u, stack_size);
++ EXPECT_EQ(1u << 23, stack_size);
+ #else
+ EXPECT_GT(stack_size, 0u);
+ EXPECT_LT(stack_size, 20u * (1 << 20));
--- chrome/app/shutdown_signal_handlers_posix.cc
+++ chrome/app/shutdown_signal_handlers_posix.cc
@@ -187,11 +187,19 @@
diff --git a/community/chromium/disable-floc-component.patch b/community/chromium/disable-floc-component.patch
new file mode 100644
index 0000000000..335a421a8a
--- /dev/null
+++ b/community/chromium/disable-floc-component.patch
@@ -0,0 +1,15 @@
+--- chrome/browser/component_updater/floc_component_installer.cc.orig
++++ chrome/browser/component_updater/floc_component_installer.cc
+@@ -101,10 +101,12 @@
+ ComponentUpdateService* cus,
+ federated_learning::FlocSortingLshClustersService*
+ floc_sorting_lsh_clusters_service) {
++ /*
+ auto installer = base::MakeRefCounted<ComponentInstaller>(
+ std::make_unique<FlocComponentInstallerPolicy>(
+ floc_sorting_lsh_clusters_service));
+ installer->Register(cus, base::OnceClosure());
++ */
+ }
+
+ } // namespace component_updater
diff --git a/community/chromium/fix-missing-includes.patch b/community/chromium/fix-missing-includes.patch
new file mode 100644
index 0000000000..5caa68f92d
--- /dev/null
+++ b/community/chromium/fix-missing-includes.patch
@@ -0,0 +1,10 @@
+--- third_party/pdfium/core/fxcodec/png/png_decoder.h.orig
++++ third_party/pdfium/core/fxcodec/png/png_decoder.h
+@@ -9,6 +9,7 @@
+
+ #include <memory>
+
++#include "core/fxcodec/fx_codec_def.h"
+ #include "core/fxcodec/progressive_decoder_iface.h"
+
+ #ifndef PDF_ENABLE_XFA_PNG
diff --git a/community/chromium/fix-unittests-base.patch b/community/chromium/fix-unittests-base.patch
new file mode 100644
index 0000000000..34199f581e
--- /dev/null
+++ b/community/chromium/fix-unittests-base.patch
@@ -0,0 +1,56 @@
+--- ./base/debug/stack_trace_unittest.cc.orig
++++ ./base/debug/stack_trace_unittest.cc
+@@ -33,7 +33,7 @@
+ typedef testing::Test StackTraceTest;
+ #endif
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if defined(__GLIBC__) && !defined(_AIX)
+ // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
+ // See https://crbug.com/706728
+
+--- ./base/profiler/stack_sampler_posix.cc.orig
++++ ./base/profiler/stack_sampler_posix.cc
+@@ -21,18 +21,7 @@
+ }
+
+ size_t StackSampler::GetStackBufferSize() {
+- size_t stack_size = PlatformThread::GetDefaultThreadStackSize();
+-
+- pthread_attr_t attr;
+- if (stack_size == 0 && pthread_attr_init(&attr) == 0) {
+- if (pthread_attr_getstacksize(&attr, &stack_size) != 0)
+- stack_size = 0;
+- pthread_attr_destroy(&attr);
+- }
+-
+- // Maximum limits under NPTL implementation.
+- constexpr size_t kDefaultStackLimit = 4 * (1 << 20);
+- return stack_size > 0 ? stack_size : kDefaultStackLimit;
++ return 0;
+ }
+
+ } // namespace base
+--- ./base/test/generate_fontconfig_caches.cc.orig
++++ ./base/test/generate_fontconfig_caches.cc
+@@ -58,7 +58,7 @@
+ FcFini();
+
+ // Check existence of intended fontconfig cache file.
+- CHECK(base::PathExists(
+- fontconfig_caches.Append(base::StrCat({kCacheKey, "-le64.cache-7"}))));
++ //CHECK(base::PathExists(
++ // fontconfig_caches.Append(base::StrCat({kCacheKey, "-le64.cache-7"}))));
+ return 0;
+ }
+--- ./base/test/gmock_move_support.h.orig
++++ ./base/test/gmock_move_support.h
+@@ -10,7 +10,7 @@
+
+ // A similar action as testing::SaveArg, but it does an assignment with
+ // std::move() instead of always performing a copy.
+-template <size_t I = 0, typename T>
++template <std::size_t I = 0, typename T>
+ auto MoveArg(T* out) {
+ return [out](auto&&... args) {
+ *out = std::move(std::get<I>(std::tie(args...)));
diff --git a/community/chromium/fix-unittests-net-py2tests.patch b/community/chromium/fix-unittests-net-py2tests.patch
new file mode 100644
index 0000000000..99908e9524
--- /dev/null
+++ b/community/chromium/fix-unittests-net-py2tests.patch
@@ -0,0 +1,1023 @@
+--- ./net/websockets/websocket_end_to_end_test.cc.orig
++++ ./net/websockets/websocket_end_to_end_test.cc
+@@ -320,35 +320,35 @@
+
+ // Basic test of connectivity. If this test fails, nothing else can be expected
+ // to work.
+-TEST_F(WebSocketEndToEndTest, BasicSmokeTest) {
+- SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
+- GetWebSocketTestDataDirectory());
+- ASSERT_TRUE(ws_server.Start());
+- EXPECT_TRUE(ConnectAndWait(ws_server.GetURL(kEchoServer)));
+-}
++// TEST_F(WebSocketEndToEndTest, BasicSmokeTest) {
++// SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
++// GetWebSocketTestDataDirectory());
++// ASSERT_TRUE(ws_server.Start());
++// EXPECT_TRUE(ConnectAndWait(ws_server.GetURL(kEchoServer)));
++// }
+
+ // Test for issue crbug.com/433695 "Unencrypted WebSocket connection via
+ // authenticated proxy times out"
+ // TODO(ricea): Enable this when the issue is fixed.
+-TEST_F(WebSocketEndToEndTest, DISABLED_HttpsProxyUnauthedFails) {
+- SpawnedTestServer proxy_server(SpawnedTestServer::TYPE_BASIC_AUTH_PROXY,
+- base::FilePath());
+- SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
+- GetWebSocketTestDataDirectory());
+- ASSERT_TRUE(proxy_server.StartInBackground());
+- ASSERT_TRUE(ws_server.StartInBackground());
+- ASSERT_TRUE(proxy_server.BlockUntilStarted());
+- ASSERT_TRUE(ws_server.BlockUntilStarted());
+- std::string proxy_config =
+- "https=" + proxy_server.host_port_pair().ToString();
+- std::unique_ptr<ProxyResolutionService> proxy_resolution_service(
+- ConfiguredProxyResolutionService::CreateFixed(
+- proxy_config, TRAFFIC_ANNOTATION_FOR_TESTS));
+- ASSERT_TRUE(proxy_resolution_service);
+- context_.set_proxy_resolution_service(proxy_resolution_service.get());
+- EXPECT_FALSE(ConnectAndWait(ws_server.GetURL(kEchoServer)));
+- EXPECT_EQ("Proxy authentication failed", event_interface_->failure_message());
+-}
++// TEST_F(WebSocketEndToEndTest, DISABLED_HttpsProxyUnauthedFails) {
++// SpawnedTestServer proxy_server(SpawnedTestServer::TYPE_BASIC_AUTH_PROXY,
++// base::FilePath());
++// SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
++// GetWebSocketTestDataDirectory());
++// ASSERT_TRUE(proxy_server.StartInBackground());
++// ASSERT_TRUE(ws_server.StartInBackground());
++// ASSERT_TRUE(proxy_server.BlockUntilStarted());
++// ASSERT_TRUE(ws_server.BlockUntilStarted());
++// std::string proxy_config =
++// "https=" + proxy_server.host_port_pair().ToString();
++// std::unique_ptr<ProxyResolutionService> proxy_resolution_service(
++// ConfiguredProxyResolutionService::CreateFixed(
++// proxy_config, TRAFFIC_ANNOTATION_FOR_TESTS));
++// ASSERT_TRUE(proxy_resolution_service);
++// context_.set_proxy_resolution_service(proxy_resolution_service.get());
++// EXPECT_FALSE(ConnectAndWait(ws_server.GetURL(kEchoServer)));
++// EXPECT_EQ("Proxy authentication failed", event_interface_->failure_message());
++// }
+
+ // These test are not compatible with RemoteTestServer because RemoteTestServer
+ // doesn't support TYPE_BASIC_AUTH_PROXY.
+@@ -361,61 +361,61 @@
+ #define MAYBE_HttpsProxyUsed HttpsProxyUsed
+ #endif
+
+-TEST_F(WebSocketEndToEndTest, MAYBE_HttpsWssProxyUnauthedFails) {
+- SpawnedTestServer proxy_server(SpawnedTestServer::TYPE_BASIC_AUTH_PROXY,
+- base::FilePath());
+- SpawnedTestServer wss_server(SpawnedTestServer::TYPE_WSS,
+- GetWebSocketTestDataDirectory());
+- ASSERT_TRUE(proxy_server.StartInBackground());
+- ASSERT_TRUE(wss_server.StartInBackground());
+- ASSERT_TRUE(proxy_server.BlockUntilStarted());
+- ASSERT_TRUE(wss_server.BlockUntilStarted());
+- ProxyConfig proxy_config;
+- proxy_config.proxy_rules().ParseFromString(
+- "https=" + proxy_server.host_port_pair().ToString());
+- // TODO(https://crbug.com/901896): Don't rely on proxying localhost.
+- proxy_config.proxy_rules().bypass_rules.AddRulesToSubtractImplicit();
++// TEST_F(WebSocketEndToEndTest, MAYBE_HttpsWssProxyUnauthedFails) {
++// SpawnedTestServer proxy_server(SpawnedTestServer::TYPE_BASIC_AUTH_PROXY,
++// base::FilePath());
++// SpawnedTestServer wss_server(SpawnedTestServer::TYPE_WSS,
++// GetWebSocketTestDataDirectory());
++// ASSERT_TRUE(proxy_server.StartInBackground());
++// ASSERT_TRUE(wss_server.StartInBackground());
++// ASSERT_TRUE(proxy_server.BlockUntilStarted());
++// ASSERT_TRUE(wss_server.BlockUntilStarted());
++// ProxyConfig proxy_config;
++// proxy_config.proxy_rules().ParseFromString(
++// "https=" + proxy_server.host_port_pair().ToString());
++// // TODO(https://crbug.com/901896): Don't rely on proxying localhost.
++// proxy_config.proxy_rules().bypass_rules.AddRulesToSubtractImplicit();
+
+- std::unique_ptr<ProxyResolutionService> proxy_resolution_service(
+- ConfiguredProxyResolutionService::CreateFixed(ProxyConfigWithAnnotation(
+- proxy_config, TRAFFIC_ANNOTATION_FOR_TESTS)));
+- ASSERT_TRUE(proxy_resolution_service);
+- context_.set_proxy_resolution_service(proxy_resolution_service.get());
+- EXPECT_FALSE(ConnectAndWait(wss_server.GetURL(kEchoServer)));
+- EXPECT_EQ("Proxy authentication failed", event_interface_->failure_message());
+-}
++// std::unique_ptr<ProxyResolutionService> proxy_resolution_service(
++// ConfiguredProxyResolutionService::CreateFixed(ProxyConfigWithAnnotation(
++// proxy_config, TRAFFIC_ANNOTATION_FOR_TESTS)));
++// ASSERT_TRUE(proxy_resolution_service);
++// context_.set_proxy_resolution_service(proxy_resolution_service.get());
++// EXPECT_FALSE(ConnectAndWait(wss_server.GetURL(kEchoServer)));
++// EXPECT_EQ("Proxy authentication failed", event_interface_->failure_message());
++// }
+
+ // Regression test for crbug/426736 "WebSocket connections not using configured
+ // system HTTPS Proxy".
+-TEST_F(WebSocketEndToEndTest, MAYBE_HttpsProxyUsed) {
+- SpawnedTestServer proxy_server(SpawnedTestServer::TYPE_PROXY,
+- base::FilePath());
+- SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
+- GetWebSocketTestDataDirectory());
+- ASSERT_TRUE(proxy_server.StartInBackground());
+- ASSERT_TRUE(ws_server.StartInBackground());
+- ASSERT_TRUE(proxy_server.BlockUntilStarted());
+- ASSERT_TRUE(ws_server.BlockUntilStarted());
+- ProxyConfig proxy_config;
+- proxy_config.proxy_rules().ParseFromString(
+- "https=" + proxy_server.host_port_pair().ToString() + ";" +
+- "http=" + proxy_server.host_port_pair().ToString());
+- // TODO(https://crbug.com/901896): Don't rely on proxying localhost.
+- proxy_config.proxy_rules().bypass_rules.AddRulesToSubtractImplicit();
++// TEST_F(WebSocketEndToEndTest, MAYBE_HttpsProxyUsed) {
++// SpawnedTestServer proxy_server(SpawnedTestServer::TYPE_PROXY,
++// base::FilePath());
++// SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
++// GetWebSocketTestDataDirectory());
++// ASSERT_TRUE(proxy_server.StartInBackground());
++// ASSERT_TRUE(ws_server.StartInBackground());
++// ASSERT_TRUE(proxy_server.BlockUntilStarted());
++// ASSERT_TRUE(ws_server.BlockUntilStarted());
++// ProxyConfig proxy_config;
++// proxy_config.proxy_rules().ParseFromString(
++// "https=" + proxy_server.host_port_pair().ToString() + ";" +
++// "http=" + proxy_server.host_port_pair().ToString());
++// // TODO(https://crbug.com/901896): Don't rely on proxying localhost.
++// proxy_config.proxy_rules().bypass_rules.AddRulesToSubtractImplicit();
+
+- std::unique_ptr<ProxyResolutionService> proxy_resolution_service(
+- ConfiguredProxyResolutionService::CreateFixed(ProxyConfigWithAnnotation(
+- proxy_config, TRAFFIC_ANNOTATION_FOR_TESTS)));
+- context_.set_proxy_resolution_service(proxy_resolution_service.get());
+- InitialiseContext();
++// std::unique_ptr<ProxyResolutionService> proxy_resolution_service(
++// ConfiguredProxyResolutionService::CreateFixed(ProxyConfigWithAnnotation(
++// proxy_config, TRAFFIC_ANNOTATION_FOR_TESTS)));
++// context_.set_proxy_resolution_service(proxy_resolution_service.get());
++// InitialiseContext();
+
+- GURL ws_url = ws_server.GetURL(kEchoServer);
+- EXPECT_TRUE(ConnectAndWait(ws_url));
+- const TestProxyDelegateWithProxyInfo::ResolvedProxyInfo& info =
+- proxy_delegate_->resolved_proxy_info();
+- EXPECT_EQ(ws_url, info.url);
+- EXPECT_TRUE(info.proxy_info.is_http());
+-}
++// GURL ws_url = ws_server.GetURL(kEchoServer);
++// EXPECT_TRUE(ConnectAndWait(ws_url));
++// const TestProxyDelegateWithProxyInfo::ResolvedProxyInfo& info =
++// proxy_delegate_->resolved_proxy_info();
++// EXPECT_EQ(ws_url, info.url);
++// EXPECT_TRUE(info.proxy_info.is_http());
++// }
+
+ std::unique_ptr<HttpResponse> ProxyPacHandler(const HttpRequest& request) {
+ GURL url = request.GetURL();
+@@ -448,91 +448,91 @@
+ #define MAYBE_ProxyPacUsed DISABLED_ProxyPacUsed
+ #endif
+
+-TEST_F(WebSocketEndToEndTest, MAYBE_ProxyPacUsed) {
+- EmbeddedTestServer proxy_pac_server(net::EmbeddedTestServer::Type::TYPE_HTTP);
+- SpawnedTestServer proxy_server(SpawnedTestServer::TYPE_PROXY,
+- base::FilePath());
+- SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
+- GetWebSocketTestDataDirectory());
+- proxy_pac_server.RegisterRequestHandler(base::BindRepeating(ProxyPacHandler));
+- proxy_server.set_redirect_connect_to_localhost(true);
++// TEST_F(WebSocketEndToEndTest, MAYBE_ProxyPacUsed) {
++// EmbeddedTestServer proxy_pac_server(net::EmbeddedTestServer::Type::TYPE_HTTP);
++// SpawnedTestServer proxy_server(SpawnedTestServer::TYPE_PROXY,
++// base::FilePath());
++// SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
++// GetWebSocketTestDataDirectory());
++// proxy_pac_server.RegisterRequestHandler(base::BindRepeating(ProxyPacHandler));
++// proxy_server.set_redirect_connect_to_localhost(true);
+
+- ASSERT_TRUE(proxy_pac_server.Start());
+- ASSERT_TRUE(proxy_server.StartInBackground());
+- ASSERT_TRUE(ws_server.StartInBackground());
+- ASSERT_TRUE(proxy_server.BlockUntilStarted());
+- ASSERT_TRUE(ws_server.BlockUntilStarted());
++// ASSERT_TRUE(proxy_pac_server.Start());
++// ASSERT_TRUE(proxy_server.StartInBackground());
++// ASSERT_TRUE(ws_server.StartInBackground());
++// ASSERT_TRUE(proxy_server.BlockUntilStarted());
++// ASSERT_TRUE(ws_server.BlockUntilStarted());
+
+- ProxyConfig proxy_config =
+- ProxyConfig::CreateFromCustomPacURL(proxy_pac_server.GetURL(base::StrCat(
+- {"/proxy.pac?proxy=", proxy_server.host_port_pair().ToString()})));
+- proxy_config.set_pac_mandatory(true);
+- auto proxy_config_service = std::make_unique<ProxyConfigServiceFixed>(
+- ProxyConfigWithAnnotation(proxy_config, TRAFFIC_ANNOTATION_FOR_TESTS));
+- std::unique_ptr<ProxyResolutionService> proxy_resolution_service(
+- ConfiguredProxyResolutionService::CreateUsingSystemProxyResolver(
+- std::move(proxy_config_service), NetLog::Get(),
+- /*quick_check_enabled=*/true));
+- ASSERT_EQ(ws_server.host_port_pair().host(), "127.0.0.1");
+- context_.set_proxy_resolution_service(proxy_resolution_service.get());
+- InitialiseContext();
++// ProxyConfig proxy_config =
++// ProxyConfig::CreateFromCustomPacURL(proxy_pac_server.GetURL(base::StrCat(
++// {"/proxy.pac?proxy=", proxy_server.host_port_pair().ToString()})));
++// proxy_config.set_pac_mandatory(true);
++// auto proxy_config_service = std::make_unique<ProxyConfigServiceFixed>(
++// ProxyConfigWithAnnotation(proxy_config, TRAFFIC_ANNOTATION_FOR_TESTS));
++// std::unique_ptr<ProxyResolutionService> proxy_resolution_service(
++// ConfiguredProxyResolutionService::CreateUsingSystemProxyResolver(
++// std::move(proxy_config_service), NetLog::Get(),
++// /*quick_check_enabled=*/true));
++// ASSERT_EQ(ws_server.host_port_pair().host(), "127.0.0.1");
++// context_.set_proxy_resolution_service(proxy_resolution_service.get());
++// InitialiseContext();
+
+- // Use a name other than localhost, since localhost implicitly bypasses the
+- // use of proxy.pac.
+- HostPortPair fake_ws_host_port_pair("stealth-localhost",
+- ws_server.host_port_pair().port());
++// // Use a name other than localhost, since localhost implicitly bypasses the
++// // use of proxy.pac.
++// HostPortPair fake_ws_host_port_pair("stealth-localhost",
++// ws_server.host_port_pair().port());
+
+- GURL ws_url(base::StrCat(
+- {"ws://", fake_ws_host_port_pair.ToString(), "/", kEchoServer}));
+- EXPECT_TRUE(ConnectAndWait(ws_url));
+- const auto& info = proxy_delegate_->resolved_proxy_info();
+- EXPECT_EQ(ws_url, info.url);
+- EXPECT_TRUE(info.proxy_info.is_http());
+- EXPECT_EQ(info.proxy_info.ToPacString(),
+- base::StrCat({"PROXY ", proxy_server.host_port_pair().ToString()}));
+-}
++// GURL ws_url(base::StrCat(
++// {"ws://", fake_ws_host_port_pair.ToString(), "/", kEchoServer}));
++// EXPECT_TRUE(ConnectAndWait(ws_url));
++// const auto& info = proxy_delegate_->resolved_proxy_info();
++// EXPECT_EQ(ws_url, info.url);
++// EXPECT_TRUE(info.proxy_info.is_http());
++// EXPECT_EQ(info.proxy_info.ToPacString(),
++// base::StrCat({"PROXY ", proxy_server.host_port_pair().ToString()}));
++// }
+
+ // This is a regression test for crbug.com/408061 Crash in
+ // net::WebSocketBasicHandshakeStream::Upgrade.
+-TEST_F(WebSocketEndToEndTest, TruncatedResponse) {
+- SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
+- GetWebSocketTestDataDirectory());
+- ASSERT_TRUE(ws_server.Start());
+- InitialiseContext();
++// TEST_F(WebSocketEndToEndTest, TruncatedResponse) {
++// SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
++// GetWebSocketTestDataDirectory());
++// ASSERT_TRUE(ws_server.Start());
++// InitialiseContext();
+
+- GURL ws_url = ws_server.GetURL("truncated-headers");
+- EXPECT_FALSE(ConnectAndWait(ws_url));
+-}
++// GURL ws_url = ws_server.GetURL("truncated-headers");
++// EXPECT_FALSE(ConnectAndWait(ws_url));
++// }
+
+ // Regression test for crbug.com/180504 "WebSocket handshake fails when HTTP
+ // headers have trailing LWS".
+-TEST_F(WebSocketEndToEndTest, TrailingWhitespace) {
+- SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
+- GetWebSocketTestDataDirectory());
+- ASSERT_TRUE(ws_server.Start());
++// TEST_F(WebSocketEndToEndTest, TrailingWhitespace) {
++// SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
++// GetWebSocketTestDataDirectory());
++// ASSERT_TRUE(ws_server.Start());
+
+- GURL ws_url = ws_server.GetURL("trailing-whitespace");
+- sub_protocols_.push_back("sip");
+- EXPECT_TRUE(ConnectAndWait(ws_url));
+- EXPECT_EQ("sip", event_interface_->selected_subprotocol());
+-}
++// GURL ws_url = ws_server.GetURL("trailing-whitespace");
++// sub_protocols_.push_back("sip");
++// EXPECT_TRUE(ConnectAndWait(ws_url));
++// EXPECT_EQ("sip", event_interface_->selected_subprotocol());
++// }
+
+ // This is a regression test for crbug.com/169448 "WebSockets should support
+ // header continuations"
+ // TODO(ricea): HTTP continuation headers have been deprecated by RFC7230. If
+ // support for continuation headers is removed from Chrome, then this test will
+ // break and should be removed.
+-TEST_F(WebSocketEndToEndTest, HeaderContinuations) {
+- SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
+- GetWebSocketTestDataDirectory());
+- ASSERT_TRUE(ws_server.Start());
++// TEST_F(WebSocketEndToEndTest, HeaderContinuations) {
++// SpawnedTestServer ws_server(SpawnedTestServer::TYPE_WS,
++// GetWebSocketTestDataDirectory());
++// ASSERT_TRUE(ws_server.Start());
+
+- GURL ws_url = ws_server.GetURL("header-continuation");
++// GURL ws_url = ws_server.GetURL("header-continuation");
+
+- EXPECT_TRUE(ConnectAndWait(ws_url));
+- EXPECT_EQ("permessage-deflate; server_max_window_bits=10",
+- event_interface_->extensions());
+-}
++// EXPECT_TRUE(ConnectAndWait(ws_url));
++// EXPECT_EQ("permessage-deflate; server_max_window_bits=10",
++// event_interface_->extensions());
++// }
+
+ // These are not true end-to-end tests as the SpawnedTestServer doesn't
+ // support TLS 1.2.
+--- ./net/socket/ssl_client_socket_unittest.cc.orig
++++ ./net/socket/ssl_client_socket_unittest.cc
+@@ -2270,26 +2270,26 @@
+
+ // Tests that fatal alerts from the peer are processed. This is a regression
+ // test for https://crbug.com/466303.
+-TEST_P(SSLClientSocketReadTest, Read_WithFatalAlert) {
+- SpawnedTestServer::SSLOptions ssl_options;
+- auto tls_max_version = ProtocolVersionToSpawnedTestServer(version());
+- if (!tls_max_version) {
+- return;
+- }
+- ssl_options.tls_max_version = *tls_max_version;
+- ssl_options.alert_after_handshake = true;
+- ASSERT_TRUE(StartTestServer(ssl_options));
++// TEST_P(SSLClientSocketReadTest, Read_WithFatalAlert) {
++// SpawnedTestServer::SSLOptions ssl_options;
++// auto tls_max_version = ProtocolVersionToSpawnedTestServer(version());
++// if (!tls_max_version) {
++// return;
++// }
++// ssl_options.tls_max_version = *tls_max_version;
++// ssl_options.alert_after_handshake = true;
++// ASSERT_TRUE(StartTestServer(ssl_options));
+
+- int rv;
+- ASSERT_TRUE(CreateAndConnectSSLClientSocket(SSLConfig(), &rv));
+- EXPECT_THAT(rv, IsOk());
++// int rv;
++// ASSERT_TRUE(CreateAndConnectSSLClientSocket(SSLConfig(), &rv));
++// EXPECT_THAT(rv, IsOk());
+
+- // Receive the fatal alert.
+- TestCompletionCallback callback;
+- scoped_refptr<IOBuffer> buf = base::MakeRefCounted<IOBuffer>(4096);
+- EXPECT_EQ(ERR_SSL_PROTOCOL_ERROR,
+- ReadAndWaitForCompletion(sock_.get(), buf.get(), 4096));
+-}
++// // Receive the fatal alert.
++// TestCompletionCallback callback;
++// scoped_refptr<IOBuffer> buf = base::MakeRefCounted<IOBuffer>(4096);
++// EXPECT_EQ(ERR_SSL_PROTOCOL_ERROR,
++// ReadAndWaitForCompletion(sock_.get(), buf.get(), 4096));
++// }
+
+ TEST_P(SSLClientSocketReadTest, Read_SmallChunks) {
+ ASSERT_TRUE(
+@@ -2792,59 +2792,59 @@
+ EXPECT_EQ(config.cert_authorities, request_info->cert_authorities);
+ }
+
+-TEST_P(SSLClientSocketCertRequestInfoTest, CertKeyTypes) {
+- SpawnedTestServer::SSLOptions ssl_options;
+- auto tls_max_version = ProtocolVersionToSpawnedTestServer(version());
+- if (!tls_max_version) {
+- return;
+- }
+- ssl_options.tls_max_version = *tls_max_version;
+- ssl_options.request_client_certificate = true;
+- ssl_options.client_cert_types.push_back(CLIENT_CERT_RSA_SIGN);
+- ssl_options.client_cert_types.push_back(CLIENT_CERT_ECDSA_SIGN);
+- ASSERT_TRUE(StartTestServer(ssl_options));
+- scoped_refptr<SSLCertRequestInfo> request_info = GetCertRequest();
+- ASSERT_TRUE(request_info.get());
+- ASSERT_EQ(2u, request_info->cert_key_types.size());
+- EXPECT_EQ(CLIENT_CERT_RSA_SIGN, request_info->cert_key_types[0]);
+- EXPECT_EQ(CLIENT_CERT_ECDSA_SIGN, request_info->cert_key_types[1]);
+-}
++// TEST_P(SSLClientSocketCertRequestInfoTest, CertKeyTypes) {
++// SpawnedTestServer::SSLOptions ssl_options;
++// auto tls_max_version = ProtocolVersionToSpawnedTestServer(version());
++// if (!tls_max_version) {
++// return;
++// }
++// ssl_options.tls_max_version = *tls_max_version;
++// ssl_options.request_client_certificate = true;
++// ssl_options.client_cert_types.push_back(CLIENT_CERT_RSA_SIGN);
++// ssl_options.client_cert_types.push_back(CLIENT_CERT_ECDSA_SIGN);
++// ASSERT_TRUE(StartTestServer(ssl_options));
++// scoped_refptr<SSLCertRequestInfo> request_info = GetCertRequest();
++// ASSERT_TRUE(request_info.get());
++// ASSERT_EQ(2u, request_info->cert_key_types.size());
++// EXPECT_EQ(CLIENT_CERT_RSA_SIGN, request_info->cert_key_types[0]);
++// EXPECT_EQ(CLIENT_CERT_ECDSA_SIGN, request_info->cert_key_types[1]);
++// }
+
+ // Tests that the Certificate Transparency (RFC 6962) TLS extension is
+ // supported.
+-TEST_F(SSLClientSocketTest, ConnectSignedCertTimestampsTLSExtension) {
+- // Encoding of SCT List containing 'test'.
+- base::StringPiece sct_ext("\x00\x06\x00\x04test", 8);
++// TEST_F(SSLClientSocketTest, ConnectSignedCertTimestampsTLSExtension) {
++// // Encoding of SCT List containing 'test'.
++// base::StringPiece sct_ext("\x00\x06\x00\x04test", 8);
+
+- SpawnedTestServer::SSLOptions ssl_options;
+- ssl_options.signed_cert_timestamps_tls_ext = std::string(sct_ext);
+- ASSERT_TRUE(StartTestServer(ssl_options));
++// SpawnedTestServer::SSLOptions ssl_options;
++// ssl_options.signed_cert_timestamps_tls_ext = std::string(sct_ext);
++// ASSERT_TRUE(StartTestServer(ssl_options));
+
+- auto ct_verifier = std::make_unique<MockCTVerifier>();
++// auto ct_verifier = std::make_unique<MockCTVerifier>();
+
+- // Check that the SCT list is extracted from the TLS extension as expected,
+- // while also simulating that it was an unparsable response.
+- SignedCertificateTimestampAndStatusList sct_list;
+- EXPECT_CALL(*ct_verifier, Verify(_, _, _, sct_ext, _, _))
+- .WillOnce(testing::SetArgPointee<4>(sct_list));
++// // Check that the SCT list is extracted from the TLS extension as expected,
++// // while also simulating that it was an unparsable response.
++// SignedCertificateTimestampAndStatusList sct_list;
++// EXPECT_CALL(*ct_verifier, Verify(_, _, _, sct_ext, _, _))
++// .WillOnce(testing::SetArgPointee<4>(sct_list));
+
+- auto cert_and_ct_verifier = std::make_unique<CertAndCTVerifier>(
+- std::move(cert_verifier_), std::move(ct_verifier));
++// auto cert_and_ct_verifier = std::make_unique<CertAndCTVerifier>(
++// std::move(cert_verifier_), std::move(ct_verifier));
+
+- context_ = std::make_unique<SSLClientContext>(
+- ssl_config_service_.get(), cert_and_ct_verifier.get(),
+- transport_security_state_.get(), ct_policy_enforcer_.get(),
+- ssl_client_session_cache_.get(), nullptr);
++// context_ = std::make_unique<SSLClientContext>(
++// ssl_config_service_.get(), cert_and_ct_verifier.get(),
++// transport_security_state_.get(), ct_policy_enforcer_.get(),
++// ssl_client_session_cache_.get(), nullptr);
+
+- int rv;
+- ASSERT_TRUE(CreateAndConnectSSLClientSocket(SSLConfig(), &rv));
+- EXPECT_THAT(rv, IsOk());
++// int rv;
++// ASSERT_TRUE(CreateAndConnectSSLClientSocket(SSLConfig(), &rv));
++// EXPECT_THAT(rv, IsOk());
+
+- EXPECT_TRUE(sock_->signed_cert_timestamps_received_);
++// EXPECT_TRUE(sock_->signed_cert_timestamps_received_);
+
+- sock_ = nullptr;
+- context_ = nullptr;
+-}
++// sock_ = nullptr;
++// context_ = nullptr;
++// }
+
+ // Test that when a CT verifier and a CTPolicyEnforcer are defined, and
+ // the EV certificate used conforms to the CT/EV policy, its EV status
+@@ -3419,17 +3419,17 @@
+ }
+
+ // Test that DHE is removed.
+-TEST_F(SSLClientSocketTest, NoDHE) {
+- SpawnedTestServer::SSLOptions ssl_options;
+- ssl_options.key_exchanges =
+- SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA;
+- ASSERT_TRUE(StartTestServer(ssl_options));
++// TEST_F(SSLClientSocketTest, NoDHE) {
++// SpawnedTestServer::SSLOptions ssl_options;
++// ssl_options.key_exchanges =
++// SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA;
++// ASSERT_TRUE(StartTestServer(ssl_options));
+
+- SSLConfig ssl_config;
+- int rv;
+- ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv));
+- EXPECT_THAT(rv, IsError(ERR_SSL_VERSION_OR_CIPHER_MISMATCH));
+-}
++// SSLConfig ssl_config;
++// int rv;
++// ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv));
++// EXPECT_THAT(rv, IsError(ERR_SSL_VERSION_OR_CIPHER_MISMATCH));
++// }
+
+ TEST_F(SSLClientSocketTest, RequireECDHE) {
+ // Run test server without ECDHE.
+@@ -5562,51 +5562,51 @@
+ bool known_root() const { return std::get<2>(GetParam()); }
+ };
+
+-INSTANTIATE_TEST_SUITE_P(
+- All,
+- TLS13DowngradeTest,
+- Combine(Values(SpawnedTestServer::SSLOptions::TLS_MAX_VERSION_TLS1_0,
+- SpawnedTestServer::SSLOptions::TLS_MAX_VERSION_TLS1_1,
+- SpawnedTestServer::SSLOptions::TLS_MAX_VERSION_TLS1_2),
+- Bool(),
+- Bool()));
++// INSTANTIATE_TEST_SUITE_P(
++// All,
++// TLS13DowngradeTest,
++// Combine(Values(SpawnedTestServer::SSLOptions::TLS_MAX_VERSION_TLS1_0,
++// SpawnedTestServer::SSLOptions::TLS_MAX_VERSION_TLS1_1,
++// SpawnedTestServer::SSLOptions::TLS_MAX_VERSION_TLS1_2),
++// Bool(),
++// Bool()));
+
+-TEST_P(TLS13DowngradeTest, DowngradeEnforced) {
+- SpawnedTestServer::SSLOptions ssl_options;
+- ssl_options.simulate_tls13_downgrade = simulate_tls13_downgrade();
+- ssl_options.tls_max_version = tls_max_version();
+- ASSERT_TRUE(StartTestServer(ssl_options));
+- scoped_refptr<X509Certificate> server_cert =
+- spawned_test_server()->GetCertificate();
++// TEST_P(TLS13DowngradeTest, DowngradeEnforced) {
++// SpawnedTestServer::SSLOptions ssl_options;
++// ssl_options.simulate_tls13_downgrade = simulate_tls13_downgrade();
++// ssl_options.tls_max_version = tls_max_version();
++// ASSERT_TRUE(StartTestServer(ssl_options));
++// scoped_refptr<X509Certificate> server_cert =
++// spawned_test_server()->GetCertificate();
+
+- SSLContextConfig config;
+- config.version_max = SSL_PROTOCOL_VERSION_TLS1_3;
+- // If the test is using legacy TLS versions, explicitly disable warnings
+- // (e.g., to cover cases like post-interstitial or when legacy TLS is
+- // explicitly allowed via configuration).
+- if (tls_max_version() <
+- SpawnedTestServer::SSLOptions::TLS_MAX_VERSION_TLS1_2) {
+- config.version_min_warn = SSL_PROTOCOL_VERSION_TLS1;
+- }
+- ssl_config_service_->UpdateSSLConfigAndNotify(config);
++// SSLContextConfig config;
++// config.version_max = SSL_PROTOCOL_VERSION_TLS1_3;
++// // If the test is using legacy TLS versions, explicitly disable warnings
++// // (e.g., to cover cases like post-interstitial or when legacy TLS is
++// // explicitly allowed via configuration).
++// if (tls_max_version() <
++// SpawnedTestServer::SSLOptions::TLS_MAX_VERSION_TLS1_2) {
++// config.version_min_warn = SSL_PROTOCOL_VERSION_TLS1;
++// }
++// ssl_config_service_->UpdateSSLConfigAndNotify(config);
+
+- CertVerifyResult verify_result;
+- verify_result.is_issued_by_known_root = known_root();
+- verify_result.verified_cert = server_cert;
+- cert_verifier_->ClearRules();
+- cert_verifier_->AddResultForCert(server_cert.get(), verify_result, OK);
++// CertVerifyResult verify_result;
++// verify_result.is_issued_by_known_root = known_root();
++// verify_result.verified_cert = server_cert;
++// cert_verifier_->ClearRules();
++// cert_verifier_->AddResultForCert(server_cert.get(), verify_result, OK);
+
+- ssl_client_session_cache_->Flush();
+- int rv;
+- ASSERT_TRUE(CreateAndConnectSSLClientSocket(SSLConfig(), &rv));
+- if (simulate_tls13_downgrade()) {
+- EXPECT_THAT(rv, IsError(ERR_TLS13_DOWNGRADE_DETECTED));
+- EXPECT_FALSE(sock_->IsConnected());
+- } else {
+- EXPECT_THAT(rv, IsOk());
+- EXPECT_TRUE(sock_->IsConnected());
+- }
+-}
++// ssl_client_session_cache_->Flush();
++// int rv;
++// ASSERT_TRUE(CreateAndConnectSSLClientSocket(SSLConfig(), &rv));
++// if (simulate_tls13_downgrade()) {
++// EXPECT_THAT(rv, IsError(ERR_TLS13_DOWNGRADE_DETECTED));
++// EXPECT_FALSE(sock_->IsConnected());
++// } else {
++// EXPECT_THAT(rv, IsOk());
++// EXPECT_TRUE(sock_->IsConnected());
++// }
++// }
+
+ struct SSLHandshakeDetailsParams {
+ bool alpn;
+--- ./net/url_request/url_request_unittest.cc.orig
++++ ./net/url_request/url_request_unittest.cc
+@@ -10036,147 +10036,147 @@
+ }
+ }
+
+-TEST_F(HTTPSRequestTest, ResumeTest) {
+- // Test that we attempt a session resume when making two connections to the
+- // same host.
+- SpawnedTestServer::SSLOptions ssl_options;
+- ssl_options.record_resume = true;
+- SpawnedTestServer test_server(
+- SpawnedTestServer::TYPE_HTTPS, ssl_options,
+- base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
+- ASSERT_TRUE(test_server.Start());
++// TEST_F(HTTPSRequestTest, ResumeTest) {
++// // Test that we attempt a session resume when making two connections to the
++// // same host.
++// SpawnedTestServer::SSLOptions ssl_options;
++// ssl_options.record_resume = true;
++// SpawnedTestServer test_server(
++// SpawnedTestServer::TYPE_HTTPS, ssl_options,
++// base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
++// ASSERT_TRUE(test_server.Start());
+
+- default_context_.http_transaction_factory()
+- ->GetSession()
+- ->ClearSSLSessionCache();
++// default_context_.http_transaction_factory()
++// ->GetSession()
++// ->ClearSSLSessionCache();
+
+- {
+- TestDelegate d;
+- std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
+- test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d,
+- TRAFFIC_ANNOTATION_FOR_TESTS));
++// {
++// TestDelegate d;
++// std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
++// test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d,
++// TRAFFIC_ANNOTATION_FOR_TESTS));
+
+- r->Start();
+- EXPECT_TRUE(r->is_pending());
++// r->Start();
++// EXPECT_TRUE(r->is_pending());
+
+- d.RunUntilComplete();
++// d.RunUntilComplete();
+
+- EXPECT_EQ(1, d.response_started_count());
+- }
++// EXPECT_EQ(1, d.response_started_count());
++// }
+
+- reinterpret_cast<HttpCache*>(default_context_.http_transaction_factory())
+- ->CloseAllConnections(ERR_FAILED, "Very good reason");
++// reinterpret_cast<HttpCache*>(default_context_.http_transaction_factory())
++// ->CloseAllConnections(ERR_FAILED, "Very good reason");
+
+- {
+- TestDelegate d;
+- std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
+- test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d,
+- TRAFFIC_ANNOTATION_FOR_TESTS));
++// {
++// TestDelegate d;
++// std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
++// test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d,
++// TRAFFIC_ANNOTATION_FOR_TESTS));
+
+- r->Start();
+- EXPECT_TRUE(r->is_pending());
++// r->Start();
++// EXPECT_TRUE(r->is_pending());
+
+- d.RunUntilComplete();
++// d.RunUntilComplete();
+
+- // The response will look like;
+- // lookup uvw (TLS 1.3's compatibility session ID)
+- // insert abc
+- // lookup abc
+- // insert xyz
+- //
+- // With a newline at the end which makes the split think that there are
+- // four lines.
++// // The response will look like;
++// // lookup uvw (TLS 1.3's compatibility session ID)
++// // insert abc
++// // lookup abc
++// // insert xyz
++// //
++// // With a newline at the end which makes the split think that there are
++// // four lines.
+
+- EXPECT_EQ(1, d.response_started_count());
+- std::vector<std::string> lines = base::SplitString(
+- d.data_received(), "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+- ASSERT_EQ(5u, lines.size()) << d.data_received();
++// EXPECT_EQ(1, d.response_started_count());
++// std::vector<std::string> lines = base::SplitString(
++// d.data_received(), "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
++// ASSERT_EQ(5u, lines.size()) << d.data_received();
+
+- std::string session_id;
++// std::string session_id;
+
+- for (size_t i = 0; i < 3; i++) {
+- std::vector<std::string> parts = base::SplitString(
+- lines[i], "\t", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+- ASSERT_EQ(2u, parts.size());
+- if (i % 2 == 1) {
+- EXPECT_EQ("insert", parts[0]);
+- session_id = parts[1];
+- } else {
+- EXPECT_EQ("lookup", parts[0]);
+- if (i != 0)
+- EXPECT_EQ(session_id, parts[1]);
+- }
+- }
+- }
+-}
++// for (size_t i = 0; i < 3; i++) {
++// std::vector<std::string> parts = base::SplitString(
++// lines[i], "\t", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
++// ASSERT_EQ(2u, parts.size());
++// if (i % 2 == 1) {
++// EXPECT_EQ("insert", parts[0]);
++// session_id = parts[1];
++// } else {
++// EXPECT_EQ("lookup", parts[0]);
++// if (i != 0)
++// EXPECT_EQ(session_id, parts[1]);
++// }
++// }
++// }
++// }
+
+-TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) {
+- // Test that sessions aren't resumed when the value of ssl_session_cache_shard
+- // differs.
+- SpawnedTestServer::SSLOptions ssl_options;
+- ssl_options.record_resume = true;
+- SpawnedTestServer test_server(
+- SpawnedTestServer::TYPE_HTTPS, ssl_options,
+- base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
+- ASSERT_TRUE(test_server.Start());
++// TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) {
++// // Test that sessions aren't resumed when the value of ssl_session_cache_shard
++// // differs.
++// SpawnedTestServer::SSLOptions ssl_options;
++// ssl_options.record_resume = true;
++// SpawnedTestServer test_server(
++// SpawnedTestServer::TYPE_HTTPS, ssl_options,
++// base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
++// ASSERT_TRUE(test_server.Start());
+
+- default_context_.http_transaction_factory()
+- ->GetSession()
+- ->ClearSSLSessionCache();
++// default_context_.http_transaction_factory()
++// ->GetSession()
++// ->ClearSSLSessionCache();
+
+- {
+- TestDelegate d;
+- std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
+- test_server.GetURL("/"), DEFAULT_PRIORITY, &d,
+- TRAFFIC_ANNOTATION_FOR_TESTS));
++// {
++// TestDelegate d;
++// std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
++// test_server.GetURL("/"), DEFAULT_PRIORITY, &d,
++// TRAFFIC_ANNOTATION_FOR_TESTS));
+
+- r->Start();
+- EXPECT_TRUE(r->is_pending());
++// r->Start();
++// EXPECT_TRUE(r->is_pending());
+
+- d.RunUntilComplete();
++// d.RunUntilComplete();
+
+- EXPECT_EQ(1, d.response_started_count());
+- }
++// EXPECT_EQ(1, d.response_started_count());
++// }
+
+- // Now create a new HttpCache with a different ssl_session_cache_shard value.
+- HttpNetworkSession::Context session_context;
+- session_context.host_resolver = default_context_.host_resolver();
+- session_context.cert_verifier = default_context_.cert_verifier();
+- session_context.transport_security_state =
+- default_context_.transport_security_state();
+- session_context.ct_policy_enforcer = default_context_.ct_policy_enforcer();
+- session_context.proxy_resolution_service =
+- default_context_.proxy_resolution_service();
+- session_context.ssl_config_service = default_context_.ssl_config_service();
+- session_context.http_auth_handler_factory =
+- default_context_.http_auth_handler_factory();
+- session_context.http_server_properties =
+- default_context_.http_server_properties();
+- session_context.quic_context = default_context_.quic_context();
++// // Now create a new HttpCache with a different ssl_session_cache_shard value.
++// HttpNetworkSession::Context session_context;
++// session_context.host_resolver = default_context_.host_resolver();
++// session_context.cert_verifier = default_context_.cert_verifier();
++// session_context.transport_security_state =
++// default_context_.transport_security_state();
++// session_context.ct_policy_enforcer = default_context_.ct_policy_enforcer();
++// session_context.proxy_resolution_service =
++// default_context_.proxy_resolution_service();
++// session_context.ssl_config_service = default_context_.ssl_config_service();
++// session_context.http_auth_handler_factory =
++// default_context_.http_auth_handler_factory();
++// session_context.http_server_properties =
++// default_context_.http_server_properties();
++// session_context.quic_context = default_context_.quic_context();
+
+- HttpNetworkSession network_session(HttpNetworkSession::Params(),
+- session_context);
+- std::unique_ptr<HttpCache> cache(
+- new HttpCache(&network_session, HttpCache::DefaultBackend::InMemory(0),
+- false /* is_main_cache */));
++// HttpNetworkSession network_session(HttpNetworkSession::Params(),
++// session_context);
++// std::unique_ptr<HttpCache> cache(
++// new HttpCache(&network_session, HttpCache::DefaultBackend::InMemory(0),
++// false /* is_main_cache */));
+
+- default_context_.set_http_transaction_factory(cache.get());
++// default_context_.set_http_transaction_factory(cache.get());
+
+- {
+- TestDelegate d;
+- std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
+- test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d,
+- TRAFFIC_ANNOTATION_FOR_TESTS));
++// {
++// TestDelegate d;
++// std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
++// test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d,
++// TRAFFIC_ANNOTATION_FOR_TESTS));
+
+- r->Start();
+- EXPECT_TRUE(r->is_pending());
++// r->Start();
++// EXPECT_TRUE(r->is_pending());
+
+- d.RunUntilComplete();
++// d.RunUntilComplete();
+
+- EXPECT_EQ(1, d.response_started_count());
+- EXPECT_EQ(SSLInfo::HANDSHAKE_FULL, r->ssl_info().handshake_type);
+- }
+-}
++// EXPECT_EQ(1, d.response_started_count());
++// EXPECT_EQ(SSLInfo::HANDSHAKE_FULL, r->ssl_info().handshake_type);
++// }
++// }
+
+ // Test that sessions started with privacy mode enabled cannot be resumed when
+ // it is disabled, and vice versa.
+@@ -10278,37 +10278,37 @@
+ };
+
+ // Tests the TLS 1.0 fallback doesn't happen.
+-TEST_F(HTTPSFallbackTest, TLSv1NoFallback) {
+- SpawnedTestServer::SSLOptions ssl_options(
+- SpawnedTestServer::SSLOptions::CERT_OK);
+- ssl_options.tls_intolerant =
+- SpawnedTestServer::SSLOptions::TLS_INTOLERANT_TLS1_1;
++// TEST_F(HTTPSFallbackTest, TLSv1NoFallback) {
++// SpawnedTestServer::SSLOptions ssl_options(
++// SpawnedTestServer::SSLOptions::CERT_OK);
++// ssl_options.tls_intolerant =
++// SpawnedTestServer::SSLOptions::TLS_INTOLERANT_TLS1_1;
+
+- ASSERT_NO_FATAL_FAILURE(DoFallbackTest(ssl_options));
+- ExpectFailure(ERR_SSL_VERSION_OR_CIPHER_MISMATCH);
+-}
++// ASSERT_NO_FATAL_FAILURE(DoFallbackTest(ssl_options));
++// ExpectFailure(ERR_SSL_VERSION_OR_CIPHER_MISMATCH);
++// }
+
+ // Tests the TLS 1.1 fallback doesn't happen.
+-TEST_F(HTTPSFallbackTest, TLSv1_1NoFallback) {
+- SpawnedTestServer::SSLOptions ssl_options(
+- SpawnedTestServer::SSLOptions::CERT_OK);
+- ssl_options.tls_intolerant =
+- SpawnedTestServer::SSLOptions::TLS_INTOLERANT_TLS1_2;
++// TEST_F(HTTPSFallbackTest, TLSv1_1NoFallback) {
++// SpawnedTestServer::SSLOptions ssl_options(
++// SpawnedTestServer::SSLOptions::CERT_OK);
++// ssl_options.tls_intolerant =
++// SpawnedTestServer::SSLOptions::TLS_INTOLERANT_TLS1_2;
+
+- ASSERT_NO_FATAL_FAILURE(DoFallbackTest(ssl_options));
+- ExpectFailure(ERR_SSL_VERSION_OR_CIPHER_MISMATCH);
+-}
++// ASSERT_NO_FATAL_FAILURE(DoFallbackTest(ssl_options));
++// ExpectFailure(ERR_SSL_VERSION_OR_CIPHER_MISMATCH);
++// }
+
+ // Tests the TLS 1.2 fallback doesn't happen.
+-TEST_F(HTTPSFallbackTest, TLSv1_2NoFallback) {
+- SpawnedTestServer::SSLOptions ssl_options(
+- SpawnedTestServer::SSLOptions::CERT_OK);
+- ssl_options.tls_intolerant =
+- SpawnedTestServer::SSLOptions::TLS_INTOLERANT_TLS1_3;
++// TEST_F(HTTPSFallbackTest, TLSv1_2NoFallback) {
++// SpawnedTestServer::SSLOptions ssl_options(
++// SpawnedTestServer::SSLOptions::CERT_OK);
++// ssl_options.tls_intolerant =
++// SpawnedTestServer::SSLOptions::TLS_INTOLERANT_TLS1_3;
+
+- ASSERT_NO_FATAL_FAILURE(DoFallbackTest(ssl_options));
+- ExpectFailure(ERR_SSL_VERSION_OR_CIPHER_MISMATCH);
+-}
++// ASSERT_NO_FATAL_FAILURE(DoFallbackTest(ssl_options));
++// ExpectFailure(ERR_SSL_VERSION_OR_CIPHER_MISMATCH);
++// }
+
+ class HTTPSSessionTest : public TestWithTaskEnvironment {
+ public:
+@@ -10329,55 +10329,55 @@
+
+ // Tests that session resumption is not attempted if an invalid certificate
+ // is presented.
+-TEST_F(HTTPSSessionTest, DontResumeSessionsForInvalidCertificates) {
+- SpawnedTestServer::SSLOptions ssl_options;
+- ssl_options.record_resume = true;
+- SpawnedTestServer test_server(
+- SpawnedTestServer::TYPE_HTTPS, ssl_options,
+- base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
+- ASSERT_TRUE(test_server.Start());
++// TEST_F(HTTPSSessionTest, DontResumeSessionsForInvalidCertificates) {
++// SpawnedTestServer::SSLOptions ssl_options;
++// ssl_options.record_resume = true;
++// SpawnedTestServer test_server(
++// SpawnedTestServer::TYPE_HTTPS, ssl_options,
++// base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
++// ASSERT_TRUE(test_server.Start());
+
+- default_context_.http_transaction_factory()
+- ->GetSession()
+- ->ClearSSLSessionCache();
++// default_context_.http_transaction_factory()
++// ->GetSession()
++// ->ClearSSLSessionCache();
+
+- // Simulate the certificate being expired and attempt a connection.
+- cert_verifier_.set_default_result(ERR_CERT_DATE_INVALID);
+- {
+- TestDelegate d;
+- std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
+- test_server.GetURL("/"), DEFAULT_PRIORITY, &d,
+- TRAFFIC_ANNOTATION_FOR_TESTS));
++// // Simulate the certificate being expired and attempt a connection.
++// cert_verifier_.set_default_result(ERR_CERT_DATE_INVALID);
++// {
++// TestDelegate d;
++// std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
++// test_server.GetURL("/"), DEFAULT_PRIORITY, &d,
++// TRAFFIC_ANNOTATION_FOR_TESTS));
+
+- r->Start();
+- EXPECT_TRUE(r->is_pending());
++// r->Start();
++// EXPECT_TRUE(r->is_pending());
+
+- d.RunUntilComplete();
++// d.RunUntilComplete();
+
+- EXPECT_EQ(1, d.response_started_count());
+- }
++// EXPECT_EQ(1, d.response_started_count());
++// }
+
+- reinterpret_cast<HttpCache*>(default_context_.http_transaction_factory())
+- ->CloseAllConnections(ERR_FAILED, "Very good reason");
++// reinterpret_cast<HttpCache*>(default_context_.http_transaction_factory())
++// ->CloseAllConnections(ERR_FAILED, "Very good reason");
+
+- // Now change the certificate to be acceptable (so that the response is
+- // loaded), and ensure that no session id is presented to the peer.
+- cert_verifier_.set_default_result(OK);
+- {
+- TestDelegate d;
+- std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
+- test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d,
+- TRAFFIC_ANNOTATION_FOR_TESTS));
++// // Now change the certificate to be acceptable (so that the response is
++// // loaded), and ensure that no session id is presented to the peer.
++// cert_verifier_.set_default_result(OK);
++// {
++// TestDelegate d;
++// std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
++// test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d,
++// TRAFFIC_ANNOTATION_FOR_TESTS));
+
+- r->Start();
+- EXPECT_TRUE(r->is_pending());
++// r->Start();
++// EXPECT_TRUE(r->is_pending());
+
+- d.RunUntilComplete();
++// d.RunUntilComplete();
+
+- EXPECT_EQ(1, d.response_started_count());
+- EXPECT_EQ(SSLInfo::HANDSHAKE_FULL, r->ssl_info().handshake_type);
+- }
+-}
++// EXPECT_EQ(1, d.response_started_count());
++// EXPECT_EQ(SSLInfo::HANDSHAKE_FULL, r->ssl_info().handshake_type);
++// }
++// }
+
+ // Interceptor to check that secure DNS has been disabled. Secure DNS should be
+ // disabled for any network fetch triggered during certificate verification as
diff --git a/community/chromium/fix-unittests-net.patch b/community/chromium/fix-unittests-net.patch
new file mode 100644
index 0000000000..e8d9587075
--- /dev/null
+++ b/community/chromium/fix-unittests-net.patch
@@ -0,0 +1,259 @@
+--- ./net/third_party/quiche/src/epoll_server/simple_epoll_server.cc.orig
++++ ./net/third_party/quiche/src/epoll_server/simple_epoll_server.cc
+@@ -7,6 +7,7 @@
+ #include <errno.h> // for errno and strerror_r
+ #include <stdlib.h> // for abort
+ #include <unistd.h> // For read, pipe, close and write.
++#include <string.h>
+
+ #include <algorithm>
+ #include <utility>
+--- ./net/third_party/quiche/src/common/quiche_endian.h.orig
++++ ./net/third_party/quiche/src/common/quiche_endian.h
+@@ -8,6 +8,7 @@
+ #include <algorithm>
+ #include <cstdint>
+ #include <type_traits>
++#include <array>
+
+ #include "common/platform/api/quiche_export.h"
+
+--- ./net/third_party/quiche/src/common/quiche_circular_deque_test.cc.orig
++++ ./net/third_party/quiche/src/common/quiche_circular_deque_test.cc
+@@ -578,130 +578,130 @@
+ };
+ } // namespace
+
+-TEST_F(QuicheCircularDequeTest, RelocateNonTriviallyCopyable) {
+- // When relocating non-trivially-copyable objects:
+- // - Move constructor is preferred, if available.
+- // - Copy constructor is used otherwise.
++// TEST_F(QuicheCircularDequeTest, RelocateNonTriviallyCopyable) {
++// // When relocating non-trivially-copyable objects:
++// // - Move constructor is preferred, if available.
++// // - Copy constructor is used otherwise.
+
+- {
+- // Move construct in Relocate.
+- using MoveConstructible = std::unique_ptr<Foo>;
+- ASSERT_FALSE(std::is_trivially_copyable<MoveConstructible>::value);
+- ASSERT_TRUE(std::is_move_constructible<MoveConstructible>::value);
+- QuicheCircularDeque<MoveConstructible, 3,
+- CountingAllocator<MoveConstructible>>
+- dq1;
+- dq1.resize(3);
+- EXPECT_EQ(dq1.size(), dq1.capacity());
+- EXPECT_EQ(1u, dq1.get_allocator().allocate_count());
++// {
++// // Move construct in Relocate.
++// using MoveConstructible = std::unique_ptr<Foo>;
++// ASSERT_FALSE(std::is_trivially_copyable<MoveConstructible>::value);
++// ASSERT_TRUE(std::is_move_constructible<MoveConstructible>::value);
++// QuicheCircularDeque<MoveConstructible, 3,
++// CountingAllocator<MoveConstructible>>
++// dq1;
++// dq1.resize(3);
++// EXPECT_EQ(dq1.size(), dq1.capacity());
++// EXPECT_EQ(1u, dq1.get_allocator().allocate_count());
+
+- dq1.emplace_back(new Foo(0xF1)); // Cause existing elements to relocate.
+- EXPECT_EQ(4u, dq1.size());
+- EXPECT_EQ(2u, dq1.get_allocator().allocate_count());
+- EXPECT_EQ(dq1[0], nullptr);
+- EXPECT_EQ(dq1[1], nullptr);
+- EXPECT_EQ(dq1[2], nullptr);
+- EXPECT_EQ(dq1[3]->i(), 0xF1);
+- }
++// dq1.emplace_back(new Foo(0xF1)); // Cause existing elements to relocate.
++// EXPECT_EQ(4u, dq1.size());
++// EXPECT_EQ(2u, dq1.get_allocator().allocate_count());
++// EXPECT_EQ(dq1[0], nullptr);
++// EXPECT_EQ(dq1[1], nullptr);
++// EXPECT_EQ(dq1[2], nullptr);
++// EXPECT_EQ(dq1[3]->i(), 0xF1);
++// }
+
+- {
+- // Copy construct in Relocate.
+- using NonMoveConstructible = Foo;
+- ASSERT_FALSE(std::is_trivially_copyable<NonMoveConstructible>::value);
+- ASSERT_FALSE(std::is_move_constructible<NonMoveConstructible>::value);
+- QuicheCircularDeque<NonMoveConstructible, 3,
+- CountingAllocator<NonMoveConstructible>>
+- dq2;
+- dq2.resize(3);
+- EXPECT_EQ(dq2.size(), dq2.capacity());
+- EXPECT_EQ(1u, dq2.get_allocator().allocate_count());
++// {
++// // Copy construct in Relocate.
++// using NonMoveConstructible = Foo;
++// ASSERT_FALSE(std::is_trivially_copyable<NonMoveConstructible>::value);
++// ASSERT_FALSE(std::is_move_constructible<NonMoveConstructible>::value);
++// QuicheCircularDeque<NonMoveConstructible, 3,
++// CountingAllocator<NonMoveConstructible>>
++// dq2;
++// dq2.resize(3);
++// EXPECT_EQ(dq2.size(), dq2.capacity());
++// EXPECT_EQ(1u, dq2.get_allocator().allocate_count());
+
+- dq2.emplace_back(0xF1); // Cause existing elements to relocate.
+- EXPECT_EQ(4u, dq2.size());
+- EXPECT_EQ(2u, dq2.get_allocator().allocate_count());
+- EXPECT_EQ(dq2[0].i(), 0xF00);
+- EXPECT_EQ(dq2[1].i(), 0xF00);
+- EXPECT_EQ(dq2[2].i(), 0xF00);
+- EXPECT_EQ(dq2[3].i(), 0xF1);
+- }
+-}
++// dq2.emplace_back(0xF1); // Cause existing elements to relocate.
++// EXPECT_EQ(4u, dq2.size());
++// EXPECT_EQ(2u, dq2.get_allocator().allocate_count());
++// EXPECT_EQ(dq2[0].i(), 0xF00);
++// EXPECT_EQ(dq2[1].i(), 0xF00);
++// EXPECT_EQ(dq2[2].i(), 0xF00);
++// EXPECT_EQ(dq2[3].i(), 0xF1);
++// }
++// }
+
+-TEST_F(QuicheCircularDequeTest, PushPop) {
+- // (push|pop|emplace)_(back|front)
++// TEST_F(QuicheCircularDequeTest, PushPop) {
++// // (push|pop|emplace)_(back|front)
+
+- {
+- QuicheCircularDeque<Foo, 4, CountingAllocator<Foo>> dq(4);
+- for (size_t i = 0; i < dq.size(); ++i) {
+- dq[i].Set(i + 1);
+- }
+- QUICHE_LOG(INFO) << "dq initialized to " << dq;
+- EXPECT_THAT(dq, ElementsAre(Foo(1), Foo(2), Foo(3), Foo(4)));
++// {
++// QuicheCircularDeque<Foo, 4, CountingAllocator<Foo>> dq(4);
++// for (size_t i = 0; i < dq.size(); ++i) {
++// dq[i].Set(i + 1);
++// }
++// QUICHE_LOG(INFO) << "dq initialized to " << dq;
++// EXPECT_THAT(dq, ElementsAre(Foo(1), Foo(2), Foo(3), Foo(4)));
+
+- ShiftLeft(&dq, false);
+- QUICHE_LOG(INFO) << "shift left once : " << dq;
+- EXPECT_THAT(dq, ElementsAre(Foo(2), Foo(3), Foo(4), Foo(1)));
++// ShiftLeft(&dq, false);
++// QUICHE_LOG(INFO) << "shift left once : " << dq;
++// EXPECT_THAT(dq, ElementsAre(Foo(2), Foo(3), Foo(4), Foo(1)));
+
+- ShiftLeft(&dq, true);
+- QUICHE_LOG(INFO) << "shift left twice: " << dq;
+- EXPECT_THAT(dq, ElementsAre(Foo(3), Foo(4), Foo(1), Foo(2)));
+- ASSERT_GT(&dq.front(), &dq.back());
+- // dq destructs with wrapped data.
+- }
++// ShiftLeft(&dq, true);
++// QUICHE_LOG(INFO) << "shift left twice: " << dq;
++// EXPECT_THAT(dq, ElementsAre(Foo(3), Foo(4), Foo(1), Foo(2)));
++// ASSERT_GT(&dq.front(), &dq.back());
++// // dq destructs with wrapped data.
++// }
+
+- {
+- QuicheCircularDeque<Foo, 4, CountingAllocator<Foo>> dq1(4);
+- for (size_t i = 0; i < dq1.size(); ++i) {
+- dq1[i].Set(i + 1);
+- }
+- QUICHE_LOG(INFO) << "dq1 initialized to " << dq1;
+- EXPECT_THAT(dq1, ElementsAre(Foo(1), Foo(2), Foo(3), Foo(4)));
++// {
++// QuicheCircularDeque<Foo, 4, CountingAllocator<Foo>> dq1(4);
++// for (size_t i = 0; i < dq1.size(); ++i) {
++// dq1[i].Set(i + 1);
++// }
++// QUICHE_LOG(INFO) << "dq1 initialized to " << dq1;
++// EXPECT_THAT(dq1, ElementsAre(Foo(1), Foo(2), Foo(3), Foo(4)));
+
+- ShiftRight(&dq1, false);
+- QUICHE_LOG(INFO) << "shift right once : " << dq1;
+- EXPECT_THAT(dq1, ElementsAre(Foo(4), Foo(1), Foo(2), Foo(3)));
++// ShiftRight(&dq1, false);
++// QUICHE_LOG(INFO) << "shift right once : " << dq1;
++// EXPECT_THAT(dq1, ElementsAre(Foo(4), Foo(1), Foo(2), Foo(3)));
+
+- ShiftRight(&dq1, true);
+- QUICHE_LOG(INFO) << "shift right twice: " << dq1;
+- EXPECT_THAT(dq1, ElementsAre(Foo(3), Foo(4), Foo(1), Foo(2)));
+- ASSERT_GT(&dq1.front(), &dq1.back());
+- // dq1 destructs with wrapped data.
+- }
++// ShiftRight(&dq1, true);
++// QUICHE_LOG(INFO) << "shift right twice: " << dq1;
++// EXPECT_THAT(dq1, ElementsAre(Foo(3), Foo(4), Foo(1), Foo(2)));
++// ASSERT_GT(&dq1.front(), &dq1.back());
++// // dq1 destructs with wrapped data.
++// }
+
+- { // Pop n elements from front.
+- QuicheCircularDeque<Foo, 4, CountingAllocator<Foo>> dq2(5);
+- for (size_t i = 0; i < dq2.size(); ++i) {
+- dq2[i].Set(i + 1);
+- }
+- EXPECT_THAT(dq2, ElementsAre(Foo(1), Foo(2), Foo(3), Foo(4), Foo(5)));
++// { // Pop n elements from front.
++// QuicheCircularDeque<Foo, 4, CountingAllocator<Foo>> dq2(5);
++// for (size_t i = 0; i < dq2.size(); ++i) {
++// dq2[i].Set(i + 1);
++// }
++// EXPECT_THAT(dq2, ElementsAre(Foo(1), Foo(2), Foo(3), Foo(4), Foo(5)));
+
+- EXPECT_EQ(2u, dq2.pop_front_n(2));
+- EXPECT_THAT(dq2, ElementsAre(Foo(3), Foo(4), Foo(5)));
++// EXPECT_EQ(2u, dq2.pop_front_n(2));
++// EXPECT_THAT(dq2, ElementsAre(Foo(3), Foo(4), Foo(5)));
+
+- EXPECT_EQ(3u, dq2.pop_front_n(100));
+- EXPECT_TRUE(dq2.empty());
+- }
++// EXPECT_EQ(3u, dq2.pop_front_n(100));
++// EXPECT_TRUE(dq2.empty());
++// }
+
+- { // Pop n elements from back.
+- QuicheCircularDeque<Foo, 4, CountingAllocator<Foo>> dq3(6);
+- for (size_t i = 0; i < dq3.size(); ++i) {
+- dq3[i].Set(i + 1);
+- }
+- EXPECT_THAT(dq3,
+- ElementsAre(Foo(1), Foo(2), Foo(3), Foo(4), Foo(5), Foo(6)));
++// { // Pop n elements from back.
++// QuicheCircularDeque<Foo, 4, CountingAllocator<Foo>> dq3(6);
++// for (size_t i = 0; i < dq3.size(); ++i) {
++// dq3[i].Set(i + 1);
++// }
++// EXPECT_THAT(dq3,
++// ElementsAre(Foo(1), Foo(2), Foo(3), Foo(4), Foo(5), Foo(6)));
+
+- ShiftRight(&dq3, true);
+- ShiftRight(&dq3, true);
+- ShiftRight(&dq3, true);
+- EXPECT_THAT(dq3,
+- ElementsAre(Foo(4), Foo(5), Foo(6), Foo(1), Foo(2), Foo(3)));
++// ShiftRight(&dq3, true);
++// ShiftRight(&dq3, true);
++// ShiftRight(&dq3, true);
++// EXPECT_THAT(dq3,
++// ElementsAre(Foo(4), Foo(5), Foo(6), Foo(1), Foo(2), Foo(3)));
+
+- EXPECT_EQ(2u, dq3.pop_back_n(2));
+- EXPECT_THAT(dq3, ElementsAre(Foo(4), Foo(5), Foo(6), Foo(1)));
++// EXPECT_EQ(2u, dq3.pop_back_n(2));
++// EXPECT_THAT(dq3, ElementsAre(Foo(4), Foo(5), Foo(6), Foo(1)));
+
+- EXPECT_EQ(2u, dq3.pop_back_n(2));
+- EXPECT_THAT(dq3, ElementsAre(Foo(4), Foo(5)));
+- }
+-}
++// EXPECT_EQ(2u, dq3.pop_back_n(2));
++// EXPECT_THAT(dq3, ElementsAre(Foo(4), Foo(5)));
++// }
++// }
+
+ TEST_F(QuicheCircularDequeTest, Allocation) {
+ CountingAllocator<int> alloc;
diff --git a/community/chromium/fix-unittests-sandbox.patch b/community/chromium/fix-unittests-sandbox.patch
new file mode 100644
index 0000000000..e11faced5a
--- /dev/null
+++ b/community/chromium/fix-unittests-sandbox.patch
@@ -0,0 +1,11 @@
+--- ./sandbox/linux/syscall_broker/broker_file_permission_unittest.cc.orig
++++ ./sandbox/linux/syscall_broker/broker_file_permission_unittest.cc
+@@ -134,7 +134,7 @@
+ #endif
+
+ const int kNumberOfBitsInOAccMode = 2;
+- static_assert(O_ACCMODE == ((1 << kNumberOfBitsInOAccMode) - 1),
++ static_assert(O_ACCMODE == (((1 << kNumberOfBitsInOAccMode) - 1) | O_PATH),
+ "incorrect number of bits");
+ // check every possible flag and act accordingly.
+ // Skipping AccMode bits as they are present in every case.
diff --git a/community/chromium/gdbinit.patch b/community/chromium/gdbinit.patch
new file mode 100644
index 0000000000..97992795d8
--- /dev/null
+++ b/community/chromium/gdbinit.patch
@@ -0,0 +1,21 @@
+--- tools/gdb/gdbinit.orig
++++ tools/gdb/gdbinit
+@@ -50,17 +50,7 @@
+
+ def set_src_dir(compile_dir):
+ global src_dir
+- git = subprocess.Popen(
+- ['git', '-C', compile_dir, 'rev-parse', '--show-toplevel'],
+- stdout=subprocess.PIPE,
+- stderr=subprocess.PIPE)
+- src_dir, _ = git.communicate()
+- if git.returncode:
+- return
+- if isinstance(src_dir, str):
+- src_dir = src_dir.rstrip()
+- else:
+- src_dir = src_dir.decode('utf-8').rstrip()
++ src_dir = os.path.abspath(os.getcwd())
+
+ load_libcxx_pretty_printers(src_dir)
+
diff --git a/community/chromium/llvm10-compat.patch b/community/chromium/llvm10-compat.patch
deleted file mode 100644
index b39db0af2d..0000000000
--- a/community/chromium/llvm10-compat.patch
+++ /dev/null
@@ -1,93 +0,0 @@
---- build/config/compiler/BUILD.gn.orig
-+++ build/config/compiler/BUILD.gn
-@@ -604,9 +604,6 @@
- # Experimentally determined to yield a reasonable trade-off between
- # build time, run-time performance, and binary size.
- "-mllvm:-import-instr-limit=10",
--
-- # TODO(https://crbug.com/1127713): Investigate, remove.
-- "-mllvm:-enable-dse-memoryssa=false",
- ]
- } else {
- ldflags += [ "-flto=thin" ]
-@@ -631,9 +628,6 @@
- "-Wl,--thinlto-cache-policy,$cache_policy",
- ]
-
-- # TODO(https://crbug.com/1127713): Investigate, remove.
-- ldflags += [ "-Wl,-mllvm,-enable-dse-memoryssa=false" ]
--
- ldflags += [ "-Wl,--lto-O" + lto_opt_level ]
- if (thin_lto_enable_optimizations) {
- # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
-@@ -748,7 +742,6 @@
- # simplicity we always explicitly set the architecture.
- if (current_cpu == "x64") {
- cflags += [
-- "-m64",
- "-march=$x64_arch",
- ]
- ldflags += [ "-m64" ]
-@@ -1045,11 +1038,9 @@
- cflags += [ "-maix64" ]
- ldflags += [ "-maix64" ]
- } else {
-- cflags += [ "-m64" ]
- ldflags += [ "-m64" ]
- }
- } else if (current_cpu == "s390x") {
-- cflags += [ "-m64" ]
- ldflags += [ "-m64" ]
- }
- }
-@@ -1514,11 +1505,6 @@
- # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not
- # recognize.
- cflags += [
-- # An ABI compat warning we don't care about, https://crbug.com/1102157
-- # TODO(thakis): Push this to the (few) targets that need it,
-- # instead of having a global flag.
-- "-Wno-psabi",
--
- # Ignore warnings about MSVC optimization pragmas.
- # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
- "-Wno-ignored-pragma-optimize",
-@@ -1534,9 +1520,6 @@
-
- # TODO(https://crbug.com/1028110): Evaluate and possible enable.
- "-Wno-deprecated-copy",
--
-- # TODO(https://crbug.com/1050281): Clean up, enable.
-- "-Wno-non-c-typedef-for-linkage",
- ]
-
- cflags_c += [
-@@ -1550,7 +1533,7 @@
- }
-
- if (enable_wmax_tokens) {
-- cflags += [ "-Wmax-tokens" ]
-+ cflags += [ ]
- } else {
- # TODO(https://crbug.com/1049569): Remove after Clang 87b235db.
- cflags += [ "-Wno-max-tokens" ]
---- third_party/openscreen/src/build/config/BUILD.gn
-+++ third_party/openscreen/src/build/config/BUILD.gn
-@@ -53,7 +53,6 @@
-
- if (current_cpu == "x64") {
- # These are explicitly specified in case of cross-compiling.
-- cflags += [ "-m64" ]
- ldflags += [ "-m64" ]
- } else if (current_cpu == "x86") {
- cflags += [ "-m32" ]
---- third_party/swiftshader/BUILD.gn
-+++ third_party/swiftshader/BUILD.gn
-@@ -94,7 +94,6 @@
-
- if (current_cpu == "x64") { # 64 bit version
- cflags += [
-- "-m64",
- "-fPIC",
- "-march=x86-64",
- "-mtune=generic",
diff --git a/community/chromium/missing-includes.patch b/community/chromium/missing-includes.patch
deleted file mode 100644
index ee6d973248..0000000000
--- a/community/chromium/missing-includes.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- ui/accessibility/platform/inspect/tree_formatter.h.orig
-+++ ui/accessibility/platform/inspect/tree_formatter.h
-@@ -5,6 +5,9 @@
- #ifndef UI_ACCESSIBILITY_PLATFORM_INSPECT_TREE_FORMATTER_H_
- #define UI_ACCESSIBILITY_PLATFORM_INSPECT_TREE_FORMATTER_H_
-
-+#include <vector>
-+#include <memory>
-+
- #include "ui/accessibility/platform/inspect/inspect.h"
-
- #include "ui/gfx/native_widget_types.h"
---- third_party/openscreen/src/util/crypto/random_bytes.h.orig
-+++ third_party/openscreen/src/util/crypto/random_bytes.h
-@@ -5,6 +5,7 @@
- #ifndef UTIL_CRYPTO_RANDOM_BYTES_H_
- #define UTIL_CRYPTO_RANDOM_BYTES_H_
-
-+#include <cstdint>
- #include <array>
-
- namespace openscreen {
---- third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h.orig 2020-08-23 12:43:09.289768089 +0200
-+++ third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-08-23 12:43:39.386217911 +0200
-@@ -12,5 +12,6 @@
- #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
-
-+#include <cstddef>
- #include <array>
-
- namespace webrtc {
---- chrome/browser/search/background/ntp_backgrounds.h.orig 2020-08-23 14:35:40.788447650 +0200
-+++ chrome/browser/search/background/ntp_backgrounds.h 2020-08-23 14:36:16.414865836 +0200
-@@ -6,5 +6,6 @@
- #define CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_
-
-+#include <cstddef>
- #include <array>
-
- class GURL;
diff --git a/community/chromium/musl-fixes.patch b/community/chromium/musl-fixes.patch
index 284c7d84af..ef975a4180 100644
--- a/community/chromium/musl-fixes.patch
+++ b/community/chromium/musl-fixes.patch
@@ -75,31 +75,40 @@
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
-diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig
+++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
-@@ -39,7 +39,9 @@
- #endif // defined(OS_ANDROID) && defined(__arm__)
-
- #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+@@ -55,7 +55,9 @@
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+ #if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if defined(__GLIBC__)
#include <gnu/libc-version.h>
+#endif
-
+
#include "base/linux_util.h"
#include "base/strings/string_split.h"
-@@ -295,7 +297,7 @@ void RecordLinuxDistro() {
- #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
-
+@@ -318,7 +318,7 @@
void RecordLinuxGlibcVersion() {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(__GLIBC__) && !defined(OS_CHROMEOS)
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if (defined(OS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
base::Version version(gnu_get_libc_version());
-
+
UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
+@@ -615,7 +617,9 @@
+
+ void ChromeBrowserMainExtraPartsMetrics::PostBrowserStart() {
+ RecordMemoryMetricsAfterDelay();
++#if defined(__GLIBC__)
+ RecordLinuxGlibcVersion();
++#endif
+ #if defined(USE_X11)
+ if (!features::IsUsingOzonePlatform()) {
+ // Ozone writes this histogram upon platform initialisation.
diff --git a/third_party/ots/include/opentype-sanitiser.h b/third_party/ots/include/opentype-sanitiser.h
---- third_party/ots/include/opentype-sanitiser.h
-+++ third_party/ots/include/opentype-sanitiser.h
+--- third_party/ots/src/include/opentype-sanitiser.h
++++ third_party/ots/src/include/opentype-sanitiser.h
@@ -20,6 +20,7 @@ typedef unsigned __int64 uint64_t;
#define htonl(x) _byteswap_ulong (x)
#define htons(x) _byteswap_ushort (x)
@@ -180,15 +189,30 @@ diff --git a/third_party/ots/include/opentype-sanitiser.h b/third_party/ots/incl
/*
* GNU-specific, but avoids the realpath(..., NULL)
-diff --git a/mojo/public/cpp/platform/named_platform_channel_posix.cc ./mojo/public/cpp/platform/named_platform_channel_posix.cc
-index 9082ac4..cbedae6 100644
---- a/mojo/public/cpp/platform/named_platform_channel_posix.cc
-+++ ./mojo/public/cpp/platform/named_platform_channel_posix.cc
-@@ -5,6 +5,7 @@
- #include "mojo/public/cpp/platform/named_platform_channel.h"
-
- #include <errno.h>
-+#include <string.h>
- #include <sys/socket.h>
- #include <sys/un.h>
- #include <unistd.h>
+--- ./third_party/perfetto/include/perfetto/ext/base/thread_utils.h.orig
++++ ./third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+@@ -61,9 +61,11 @@
+ #if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+ if (prctl(PR_GET_NAME, buf) != 0)
+ return false;
+-#else
++#elif defined(__GLIBC__)
+ if (pthread_getname_np(pthread_self(), buf, sizeof(buf)) != 0)
+ return false;
++#else
++ return false;
+ #endif
+ out_result = std::string(buf);
+ return true;
+--- ./base/files/file_util_posix.cc.orig
++++ ./base/files/file_util_posix.cc
+@@ -845,6 +845,9 @@
+ // NaCl doesn't implement system calls to open files directly.
+ #if !defined(OS_NACL)
+ FILE* FileToFILE(File file, const char* mode) {
++ if (!file.IsValid() || !(fcntl(file.GetPlatformFile(), F_GETFD) != -1 || errno != EBADF))
++ return nullptr;
++
+ FILE* stream = fdopen(file.GetPlatformFile(), mode);
+ if (stream)
+ file.TakePlatformFile(); \ No newline at end of file
diff --git a/community/chromium/musl-hacks.patch b/community/chromium/musl-hacks.patch
index d49773c38d..0630228c58 100644
--- a/community/chromium/musl-hacks.patch
+++ b/community/chromium/musl-hacks.patch
@@ -1,6 +1,27 @@
--- ./base/debug/stack_trace.cc
+++ ./base/debug/stack_trace.cc
-@@ -217,7 +217,9 @@
+@@ -145,7 +145,7 @@
+
+ #if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
+ uintptr_t GetStackEnd() {
+-#if defined(OS_ANDROID)
++#if defined(OS_ANDROID) || (defined(OS_LINUX) && !defined(__GLIBC__))
+ // Bionic reads proc/maps on every call to pthread_getattr_np() when called
+ // from the main thread. So we need to cache end of stack in that case to get
+ // acceptable performance.
+@@ -234,8 +234,10 @@
+ defined(MEMORY_SANITIZER)
+ // Sanitizer configurations (ASan, TSan, MSan) emit unsymbolized stacks.
+ return false;
+-#else
++#elif defined(__GLIBC__)
+ return true;
++#else
++ return false;
+ #endif
+ }
+
+@@ -251,7 +253,9 @@
}
void StackTrace::OutputToStream(std::ostream* os) const {
@@ -10,7 +31,7 @@
}
std::string StackTrace::ToString() const {
-@@ -225,7 +227,7 @@
+@@ -259,7 +263,7 @@
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
std::stringstream stream;
@@ -30,3 +51,49 @@
int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
SendResult send_result(0, 0, std::move(buffers));
if (result < 0) {
+--- ./base/debug/elf_reader.cc.orig
++++ ./base/debug/elf_reader.cc
+@@ -149,7 +149,12 @@
+ strtab_addr = static_cast<size_t>(dynamic_iter->d_un.d_ptr) +
+ reinterpret_cast<const char*>(relocation_offset);
+ #else
+- strtab_addr = reinterpret_cast<const char*>(dynamic_iter->d_un.d_ptr);
++ if (dynamic_iter->d_un.d_ptr < relocation_offset) {
++ strtab_addr = static_cast<size_t>(dynamic_iter->d_un.d_ptr) +
++ reinterpret_cast<const char*>(relocation_offset);
++ } else {
++ strtab_addr = reinterpret_cast<const char*>(dynamic_iter->d_un.d_ptr);
++ }
+ #endif
+ } else if (dynamic_iter->d_tag == DT_SONAME) {
+ soname_strtab_offset = dynamic_iter->d_un.d_val;
+--- ./mojo/public/c/system/thunks.cc.orig
++++ ./mojo/public/c/system/thunks.cc
+@@ -100,7 +100,8 @@
+ base::ScopedAllowBlocking allow_blocking;
+ base::NativeLibraryOptions library_options;
+ #if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) && \
+- !defined(MEMORY_SANITIZER) && !defined(LEAK_SANITIZER)
++ !defined(MEMORY_SANITIZER) && !defined(LEAK_SANITIZER) && \
++ defined(RTLD_DEEPBIND)
+ // Sanitizer builds cannnot support RTLD_DEEPBIND, but they also disable
+ // allocator shims, so it's unnecessary there.
+ library_options.prefer_own_symbols = true;
+--- ./base/native_library_unittest.cc.orig
++++ ./base/native_library_unittest.cc
+@@ -121,6 +121,7 @@
+ #if !defined(OS_ANDROID) && !defined(THREAD_SANITIZER) && \
+ !defined(MEMORY_SANITIZER)
+
++#if defined(RTLD_DEEPBIND)
+ // Verifies that the |prefer_own_symbols| option satisfies its guarantee that
+ // a loaded library will always prefer local symbol resolution before
+ // considering global symbols.
+@@ -156,6 +157,7 @@
+ EXPECT_EQ(2, NativeLibraryTestIncrement());
+ EXPECT_EQ(3, NativeLibraryTestIncrement());
+ }
++#endif // defined(RTLD_DEEPBIND)
+
+ #endif // !defined(OS_ANDROID)
+
diff --git a/community/chromium/no-execinfo.patch b/community/chromium/no-execinfo.patch
index 89c0a8bf54..dd7ed5c16b 100644
--- a/community/chromium/no-execinfo.patch
+++ b/community/chromium/no-execinfo.patch
@@ -9,7 +9,7 @@
#include <execinfo.h>
#endif
-@@ -88,7 +88,7 @@
+@@ -89,7 +89,7 @@
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).
@@ -18,7 +18,7 @@
std::string::size_type search_from = 0;
while (search_from < text->size()) {
// Look for the start of a mangled symbol, from search_from.
-@@ -135,7 +135,7 @@
+@@ -136,7 +136,7 @@
virtual ~BacktraceOutputHandler() = default;
};
@@ -27,16 +27,16 @@
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
// This should be more than enough to store a 64-bit number in hex:
// 16 hex digits + 1 for null-terminator.
-@@ -834,7 +834,7 @@
- // NOTE: This code MUST be async-signal safe (it's used by in-process
- // stack dumping signal handler). NO malloc or stdio is allowed here.
-
--#if !defined(__UCLIBC__) && !defined(_AIX)
-+#if defined(__GLIBC__) && !defined(_AIX)
+@@ -839,7 +839,7 @@
+ // If we do not have unwind tables, then try tracing using frame pointers.
+ return base::debug::TraceStackFramePointers(const_cast<const void**>(trace),
+ count, 0);
+-#elif !defined(__UCLIBC__) && !defined(_AIX)
++#elif defined(__GLIBC__) && !defined(_AIX)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
return base::saturated_cast<size_t>(backtrace(trace, count));
-@@ -847,13 +847,13 @@
+@@ -852,13 +852,13 @@
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
@@ -55,18 +55,18 @@
--- v8/src/codegen/external-reference-table.cc.orig
+++ v8/src/codegen/external-reference-table.cc
@@ -11,7 +11,9 @@
-
+
#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
#define SYMBOLIZE_FUNCTION
+#if defined(__GLIBC__)
#include <execinfo.h>
+#endif
+
#include <vector>
- #endif // DEBUG && V8_OS_LINUX && !V8_OS_ANDROID
-
-@@ -93,7 +95,7 @@
+
+@@ -96,7 +98,7 @@
}
-
+
const char* ExternalReferenceTable::ResolveSymbol(void* address) {
-#ifdef SYMBOLIZE_FUNCTION
+#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__)
diff --git a/community/chromium/no-mallinfo.patch b/community/chromium/no-mallinfo.patch
index fbf473c0e7..741443348a 100644
--- a/community/chromium/no-mallinfo.patch
+++ b/community/chromium/no-mallinfo.patch
@@ -11,23 +11,43 @@
// Sanitizers override mallinfo.
--- ./base/process/process_metrics_posix.cc
+++ ./base/process/process_metrics_posix.cc
-@@ -110,17 +110,16 @@
+@@ -105,7 +105,7 @@
+
+ #endif // !defined(OS_FUCHSIA)
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
++#if (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
+ namespace {
+
+ size_t GetMallocUsageMallinfo() {
+@@ -127,16 +127,16 @@
+ }
+
+ } // namespace
+-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
++#endif // (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
+
+ size_t ProcessMetrics::GetMallocUsage() {
+ #if defined(OS_APPLE)
malloc_statistics_t stats = {0};
malloc_zone_statistics(nullptr, &stats);
return stats.size_in_use;
-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
+#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
- struct mallinfo minfo = mallinfo();
- #if BUILDFLAG(USE_TCMALLOC)
- return minfo.uordblks;
- #else
- return minfo.hblkhd + minfo.arena;
- #endif
+ return GetMallocUsageMallinfo();
-#elif defined(OS_FUCHSIA)
-+#endif
++#else
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
return 0;
--#endif
- }
+ #endif
+--- third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc.orig
++++ third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
+@@ -35,7 +35,7 @@
- } // namespace base
+ MemoryUsage GetMemoryUsage() {
+ MemoryUsage result;
+-#ifdef __linux__
++#if defined(__linux__) && defined(__GLIBC__)
+ rusage res;
+ if (getrusage(RUSAGE_SELF, &res) == 0) {
+ result.max_rss_kb = res.ru_maxrss;
diff --git a/community/chromium/quiche-arena-size.patch b/community/chromium/quiche-arena-size.patch
new file mode 100644
index 0000000000..1b5db645c3
--- /dev/null
+++ b/community/chromium/quiche-arena-size.patch
@@ -0,0 +1,11 @@
+--- ./net/third_party/quiche/src/quic/core/quic_one_block_arena.h
++++ ./net/third_party/quiche/src/quic/core/quic_one_block_arena.h
+@@ -69,7 +69,7 @@
+
+ // QuicConnections currently use around 1KB of polymorphic types which would
+ // ordinarily be on the heap. Instead, store them inline in an arena.
+-using QuicConnectionArena = QuicOneBlockArena<1056>;
++using QuicConnectionArena = QuicOneBlockArena<1408>;
+
+ } // namespace quic
+
diff --git a/community/chromium/remove-unsupported-attribute.patch b/community/chromium/remove-unsupported-attribute.patch
new file mode 100644
index 0000000000..f27ade4478
--- /dev/null
+++ b/community/chromium/remove-unsupported-attribute.patch
@@ -0,0 +1,27 @@
+--- ./base/check.h.orig
++++ ./base/check.h
+@@ -85,7 +85,7 @@ class BASE_EXPORT CheckError {
+ // Stream for adding optional details to the error message.
+ std::ostream& stream();
+
+- NOMERGE ~CheckError();
++ ~CheckError();
+
+ CheckError(const CheckError& other) = delete;
+ CheckError& operator=(const CheckError& other) = delete;
+diff --git a/base/compiler_specific.h b/base/compiler_specific.h
+index 14a5d6870df43..fa961b0cee1af 100644
+--- ./base/compiler_specific.h.orig
++++ ./base/compiler_specific.h
+@@ -340,11 +340,4 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) {
+
+ #endif // defined(__clang_analyzer__)
+
+-// Use nomerge attribute to disable optimization of merging multiple same calls.
+-#if defined(__clang__) && __has_attribute(nomerge)
+-#define NOMERGE [[clang::nomerge]]
+-#else
+-#define NOMERGE
+-#endif
+-
+ // Marks a type as being eligible for the "trivial" ABI despite having a
diff --git a/community/chromium/renamed-freetype-member.patch b/community/chromium/renamed-freetype-member.patch
new file mode 100644
index 0000000000..92b708d223
--- /dev/null
+++ b/community/chromium/renamed-freetype-member.patch
@@ -0,0 +1,35 @@
+--- ./third_party/skia/src/ports/SkFontHost_FreeType_common.cpp.orig
++++ ./third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
+@@ -712,7 +712,7 @@
+ canvas->drawPaint(colrPaint);
+ break;
+ }
+- case FT_COLR_PAINTFORMAT_TRANSFORMED:
++ case FT_COLR_PAINTFORMAT_TRANSFORM:
+ case FT_COLR_PAINTFORMAT_TRANSLATE:
+ case FT_COLR_PAINTFORMAT_ROTATE:
+ case FT_COLR_PAINTFORMAT_SKEW:
+@@ -759,8 +759,8 @@
+ SkMatrix transform;
+
+ switch (colrv1_paint.format) {
+- case FT_COLR_PAINTFORMAT_TRANSFORMED: {
+- transform = ToSkMatrix(colrv1_paint.u.transformed.affine);
++ case FT_COLR_PAINTFORMAT_TRANSFORM: {
++ transform = ToSkMatrix(colrv1_paint.u.transform.affine);
+ break;
+ }
+ case FT_COLR_PAINTFORMAT_TRANSLATE: {
+@@ -880,10 +880,10 @@
+ traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID,
+ FT_COLOR_NO_ROOT_TRANSFORM);
+ break;
+- case FT_COLR_PAINTFORMAT_TRANSFORMED:
++ case FT_COLR_PAINTFORMAT_TRANSFORM:
+ colrv1_transform(canvas, face, paint);
+ traverse_result = colrv1_traverse_paint(canvas, palette, face,
+- paint.u.transformed.paint, visited_set);
++ paint.u.transform.paint, visited_set);
+ break;
+ case FT_COLR_PAINTFORMAT_TRANSLATE:
+ colrv1_transform(canvas, face, paint);
diff --git a/community/chromium/resolver.patch b/community/chromium/resolver.patch
index e9f9f7b6a9..e98e0e5e8e 100644
--- a/community/chromium/resolver.patch
+++ b/community/chromium/resolver.patch
@@ -34,3 +34,27 @@
DnsReloaderMaybeReload();
#endif
base::Optional<AddressInfo> ai;
+--- ./net/dns/dns_config_service_linux.cc.orig
++++ ./net/dns/dns_config_service_linux.cc
+@@ -486,20 +480,11 @@
+
+ std::unique_ptr<struct __res_state>
+ DnsConfigServiceLinux::ResolvReader::GetResState() {
+- auto res = std::make_unique<struct __res_state>();
+- memset(res.get(), 0, sizeof(struct __res_state));
+-
+- if (res_ninit(res.get()) != 0) {
+- CloseResState(res.get());
+- return nullptr;
+- }
+-
+- return res;
++ return nullptr;
+ }
+
+ void DnsConfigServiceLinux::ResolvReader::CloseResState(
+ struct __res_state* res) {
+- res_nclose(res);
+ }
+
+ DnsConfigServiceLinux::DnsConfigServiceLinux()
diff --git a/community/chromium/revert-2778794.patch b/community/chromium/revert-2778794.patch
new file mode 100644
index 0000000000..47069c7b73
--- /dev/null
+++ b/community/chromium/revert-2778794.patch
@@ -0,0 +1,14 @@
+--- ./third_party/closure_compiler/compiler.py.orig
++++ ./third_party/closure_compiler/compiler.py
+@@ -13,8 +13,9 @@
+
+
+ _CURRENT_DIR = os.path.join(os.path.dirname(__file__))
+-_JAVA_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
+-assert os.path.isfile(_JAVA_PATH), "java only allowed in android builds"
++_JAVA_BIN = "java"
++_JDK_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", _JAVA_BIN)
++_JAVA_PATH = _JDK_PATH if os.path.isfile(_JDK_PATH) else _JAVA_BIN
+
+ class Compiler(object):
+ """Runs the Closure compiler on given source files to typecheck them
diff --git a/community/chromium/scoped-file.patch b/community/chromium/scoped-file.patch
new file mode 100644
index 0000000000..34bf6eb4e7
--- /dev/null
+++ b/community/chromium/scoped-file.patch
@@ -0,0 +1,31 @@
+--- ./base/files/scoped_file_linux.cc.orig
++++ ./base/files/scoped_file_linux.cc
+@@ -7,6 +7,7 @@
+ #include <algorithm>
+ #include <array>
+ #include <atomic>
++#include <dlfcn.h>
+
+ #include "base/compiler_specific.h"
+ #include "base/debug/stack_trace.h"
+@@ -80,9 +81,18 @@
+
+ extern "C" {
+
+-int __close(int);
+-
+ __attribute__((visibility("default"), noinline)) int close(int fd) {
++ static int (*__close)(int) = nullptr;
++
++ if (__close == nullptr) {
++ __close = (int (*)(int))dlsym(RTLD_NEXT, "close");
++
++ if (__close == nullptr) {
++ RAW_LOG(ERROR, "musl close not found\n");
++ IMMEDIATE_CRASH();
++ }
++ }
++
+ if (base::IsFDOwned(fd) && g_is_ownership_enforced)
+ CrashOnFdOwnershipViolation();
+ return __close(fd);
diff --git a/community/chromium/strip-binary.patch b/community/chromium/strip-binary.patch
new file mode 100644
index 0000000000..de87bd4d55
--- /dev/null
+++ b/community/chromium/strip-binary.patch
@@ -0,0 +1,20 @@
+--- build/linux/strip_binary.gni.orig
++++ build/linux/strip_binary.gni
+@@ -20,7 +20,7 @@
+ "testonly",
+ ])
+ action("${target_name}") {
+- eu_strip_binary = "//buildtools/third_party/eu-strip/bin/eu-strip"
++ eu_strip_binary = "/usr/bin/eu-strip"
+ script = "//build/linux/strip_binary.py"
+ inputs = [
+ invoker.binary_input,
+@@ -32,7 +32,7 @@
+ ]
+ args = [
+ "--eu-strip-binary-path",
+- rebase_path(eu_strip_binary, root_build_dir),
++ eu_strip_binary,
+ "--symbol-output",
+ rebase_path(invoker.symbol_output, root_build_dir),
+ "--stripped-binary-output",
diff --git a/community/chromium/v8-constexpr.patch b/community/chromium/v8-constexpr.patch
new file mode 100644
index 0000000000..d6e435591b
--- /dev/null
+++ b/community/chromium/v8-constexpr.patch
@@ -0,0 +1,11 @@
+--- ./v8/src/codegen/arm64/register-arm64.h.orig
++++ ./v8/src/codegen/arm64/register-arm64.h
+@@ -413,7 +413,7 @@
+ static constexpr int kMaxNumRegisters = kNumberOfVRegisters;
+ STATIC_ASSERT(kMaxNumRegisters == kDoubleAfterLast);
+
+- static VRegister from_code(int code) {
++ static constexpr VRegister from_code(int code) {
+ // Always return a D register.
+ return VRegister::Create(code, kDRegSizeInBits);
+ }