Reenabling TestStop

- Added contrib/grab-headless_shell.sh to grab latest headless_shell
- Changed travis config to use contrib/grab-headless_shell.sh
- Reenabled TestStop since Page.stopLoading is now available with latest
  available headless_shell
This commit is contained in:
Kenneth Shaw 2017-02-22 07:58:30 +07:00
parent d15303bae6
commit 6ce1f2fdfb
3 changed files with 19 additions and 4 deletions

View File

@ -3,10 +3,8 @@ go:
- 1.7 - 1.7
- tip - tip
before_install: before_install:
- mkdir -p $HOME/hs
- wget -O $HOME/hs/hs.tar.bz2 https://storage.googleapis.com/docker-chrome-headless/headless_shell.tar.bz2
- tar -jxvf $HOME/hs/hs.tar.bz2 -C $HOME/hs
- go get github.com/mattn/goveralls - go get github.com/mattn/goveralls
- ./contrib/grab-headless_shell.sh $HOME/hs
script: script:
- export CHROMEDP_NO_SANDBOX=true - export CHROMEDP_NO_SANDBOX=true
- export PATH=$PATH:$HOME/hs - export PATH=$PATH:$HOME/hs

18
contrib/grab-headless_shell.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
OUT=${1:-headless_shell}
VER=$2
if [ -z "$VER" ]; then
VER=$(curl -s https://storage.googleapis.com/docker-chrome-headless/latest.txt|sed -e 's/^headless_shell-//' -e 's/\.tar\.bz2$//')
fi
mkdir -p $OUT
pushd $OUT &> /dev/null
curl -s https://storage.googleapis.com/docker-chrome-headless/headless_shell-$VER.tar.bz2 | tar -jxv
popd &> /dev/null

View File

@ -276,7 +276,6 @@ func TestNavigateForward(t *testing.T) {
} }
func TestStop(t *testing.T) { func TestStop(t *testing.T) {
t.Skip("Page.stopLoading not available")
t.Parallel() t.Parallel()
var err error var err error