Skip to content

Instantly share code, notes, and snippets.

@HalCanary
Created March 13, 2018 01:52
Show Gist options
  • Save HalCanary/1a63d84833343dcd38f5b9657c0bdf2a to your computer and use it in GitHub Desktop.
Save HalCanary/1a63d84833343dcd38f5b9657c0bdf2a to your computer and use it in GitHub Desktop.
#! /bin/sh
# Copyright 2018 Google Inc.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if [ $# -ne 3 ]; then
echo usage:
echo $0 EXECUTABLE URL DESTINATION_DIRECTORY
exit 1
fi
EXE="$1"
URL="$2"
DST="$3"
CRASH=~/tmp/headless_crash_dumps
mkdir -p "$CRASH"
"$EXE" --headless --disable-gpu --repl -crash-dumps-dir="$CRASH" \
--no-sandbox --enable-gpu-benchmarking "$URL" << EOF
chrome.gpuBenchmarking.printToSkPicture("${DST}")
quit
EOF
ls -l "$DST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment