-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13921 from EyeCantCU/chromium-fixes
fix(chromium): Add crashpad handler, enable ldd, add en-US locale to base package, and implement more tests
- Loading branch information
Showing
3 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
for f in /etc/chromium/*.conf; do | ||
[ -f "$f" ] && . "$f" | ||
done | ||
|
||
# Append CHROMIUM_USER_FLAGS (from env) on top of system | ||
# default CHROMIUM_FLAGS (from /etc/chromium/chromium.conf). | ||
CHROMIUM_FLAGS="$CHROMIUM_FLAGS ${CHROMIUM_USER_FLAGS:+"$CHROMIUM_USER_FLAGS"}" | ||
|
||
# Let the wrapped binary know that it has been run through the wrapper | ||
export CHROME_WRAPPER="$(readlink -f "$0")" | ||
|
||
PROGDIR=${CHROME_WRAPPER%/*} | ||
|
||
case ":$PATH:" in | ||
*:$PROGDIR:*) | ||
# $PATH already contains $PROGDIR | ||
;; | ||
*) | ||
# Append $PROGDIR to $PATH | ||
export PATH="$PATH:$PROGDIR" | ||
;; | ||
esac | ||
|
||
if [ $(id -u) -eq 0 ] && [ $(stat -c %u -L ${XDG_CONFIG_HOME:-${HOME}}) -eq 0 ]; then | ||
# Running as root with HOME owned by root. | ||
# Pass --user-data-dir to work around upstream failsafe. | ||
CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-"$HOME"/.config}/chromium $CHROMIUM_FLAGS" | ||
fi | ||
|
||
exec "$PROGDIR/chromium" ${CHROMIUM_FLAGS} "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from selenium import webdriver | ||
|
||
options = webdriver.ChromeOptions() | ||
options.add_argument('--disable-gpu') | ||
options.add_argument('--no-sandbox') | ||
options.add_argument('--headless') | ||
|
||
driver = webdriver.Chrome( | ||
options=options | ||
) | ||
|
||
driver.get('https://www.chainguard.dev/') | ||
|
||
driver.quit() |