From 6ce1f2fdfba22ab32acf65ff4c7da0c2ecbea693 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Wed, 22 Feb 2017 07:58:30 +0700 Subject: [PATCH] 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 --- .travis.yml | 4 +--- contrib/grab-headless_shell.sh | 18 ++++++++++++++++++ nav_test.go | 1 - 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 contrib/grab-headless_shell.sh diff --git a/.travis.yml b/.travis.yml index 56a07c7..ef51620 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,8 @@ go: - 1.7 - tip 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 + - ./contrib/grab-headless_shell.sh $HOME/hs script: - export CHROMEDP_NO_SANDBOX=true - export PATH=$PATH:$HOME/hs diff --git a/contrib/grab-headless_shell.sh b/contrib/grab-headless_shell.sh new file mode 100755 index 0000000..5eb2bc2 --- /dev/null +++ b/contrib/grab-headless_shell.sh @@ -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 diff --git a/nav_test.go b/nav_test.go index 7bf2e70..a3958aa 100644 --- a/nav_test.go +++ b/nav_test.go @@ -276,7 +276,6 @@ func TestNavigateForward(t *testing.T) { } func TestStop(t *testing.T) { - t.Skip("Page.stopLoading not available") t.Parallel() var err error