diff --git a/nav_test.go b/nav_test.go index ad37722..3168919 100644 --- a/nav_test.go +++ b/nav_test.go @@ -2,11 +2,13 @@ package chromedp import ( "bytes" + "fmt" "image" _ "image/png" + "net/http" + "net/http/httptest" "strings" "testing" - "time" "github.com/chromedp/cdproto/emulation" "github.com/chromedp/cdproto/page" @@ -188,19 +190,33 @@ func TestStop(t *testing.T) { func TestReload(t *testing.T) { t.Parallel() - ctx, cancel := testAllocate(t, "form.html") + count := 0 + // create test server + mux := http.NewServeMux() + mux.HandleFunc("/", func(res http.ResponseWriter, req *http.Request) { + fmt.Fprintf(res, ` +
+