Skip to content

Commit

Permalink
Fix TestBrowserUserAgent for Headless removal
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Nov 13, 2024
1 parent 0c4fe3c commit b1e5b7c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/browser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,12 @@ func TestBrowserUserAgent(t *testing.T) {

b := newTestBrowser(t)

// testBrowserVersion() tests the version already
// just look for "Headless" in UserAgent
ua := b.UserAgent()
if prefix := "Mozilla/5.0"; !strings.HasPrefix(ua, prefix) {
t.Errorf("UserAgent should start with %q, but got: %q", prefix, ua)
}
assert.Contains(t, ua, "Headless")
// We default to removing the "Headless" part of the user agent string.
assert.NotContains(t, ua, "Headless")
}

func TestBrowserCrashErr(t *testing.T) {
Expand Down

0 comments on commit b1e5b7c

Please sign in to comment.