Skip to content

Commit 56bc3a3

Browse files
authored
No more headless=old (#38)
* No more headless=old Signed-off-by: Mars Hall <mars@users.noreply.github.com> * still needs headless though Signed-off-by: Mars Hall <mars@users.noreply.github.com> * Update docs for Chrome command flags Signed-off-by: Mars Hall <mars@users.noreply.github.com> --------- Signed-off-by: Mars Hall <mars@users.noreply.github.com>
1 parent 0d6dabc commit 56bc3a3

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ heroku buildpacks:add -i 1 heroku-community/chrome-for-testing
1717

1818
Deploy the app to install Chrome for Testing. 🚀
1919

20+
## Launching `chrome`
21+
22+
To execute in a Heroku dyno, `chrome` typically requires the flags:
23+
24+
* `--headless`
25+
* `--no-sandbox`
26+
2027
## Selecting the Chrome Release Channel
2128

2229
By default, this buildpack will download the latest `Stable` release, which is provided
@@ -56,7 +63,7 @@ These locations may change in future versions of this buildpack, so please allow
5663

5764
### Changes to Command Flags
5865

59-
The prior `heroku/google-chrome` buildpack wrapped the `chrome` command with default flags using a shim script. This is no longer implemented for `chrome` in this buildpack, to support evolving changes to the Chrome for Testing flags, such as the [--headless=new variation](https://developer.chrome.com/docs/chromium/new-headless).
66+
The prior `heroku/google-chrome` buildpack wrapped the `chrome` command with default flags using a shim script. This is no longer implemented for `chrome` in this buildpack, to support evolving changes to the Chrome for Testing flags.
6067

6168
Depending on how an app is already setup for testing with Chrome, it may not require any changes.
6269

bin/test.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'chromedriver --v
1818
docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'ldd $(which chrome)'
1919
docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'ldd $(which chromedriver)'
2020

21-
# Check Chrome can fully boot in both new and old headless modes.
22-
docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'chrome --no-sandbox --headless=new --screenshot https://google.com'
23-
docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'chrome --no-sandbox --headless=old --screenshot https://google.com'
21+
# Check Chrome can fully boot.
22+
docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'chrome --no-sandbox --headless --screenshot https://google.com'
2423

2524
# Display a size breakdown of the directories added by the buildpack to the app.
2625
docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'du --human-readable --max-depth=1 /app'

0 commit comments

Comments
 (0)