Update chromedp to v0.20.1 in browsertests. (#1040)

See https://github.com/chromedp/chromedp/issues/1536.
diff --git a/browsertests/browser_test.go b/browsertests/browser_test.go
index 5fdcbfc..14af4f6 100644
--- a/browsertests/browser_test.go
+++ b/browsertests/browser_test.go
@@ -54,16 +54,16 @@
 	server := makeTestServer(t, prof)
 	ctx := newContext(context.Background(), t)
 
-	err := chromedp.Run(ctx,
+	err := chromedp.Do(ctx,
 		chromedp.Navigate(server.URL+"/top"),
-		chromedp.WaitVisible(`#toptable`, chromedp.ByID),
+		chromedp.WaitVisible(chromedp.ID(`#toptable`)),
 
 		// Check that fake profile entries show up in the right order.
 		matchRegexp(t, "#node0", `200ms.*F2`),
 		matchInOrder(t, "#toptable", "F2", "F3", "F1"),
 
 		// Check sorting by cumulative count.
-		chromedp.Click(`#cumhdr1`, chromedp.ByID),
+		chromedp.Click(chromedp.ID(`#cumhdr1`)),
 		matchInOrder(t, "#toptable", "F1", "F2", "F3"),
 	)
 	if err != nil {
@@ -78,10 +78,9 @@
 	server := makeTestServer(t, prof)
 	ctx := newContext(context.Background(), t)
 
-	var ignored []byte // Some chromedp.Evaluate() versions wants non-nil result argument
-	err := chromedp.Run(ctx,
+	err := chromedp.Do(ctx,
 		chromedp.Navigate(server.URL),
-		chromedp.Evaluate(jsTestFixture, &ignored),
+		chromedp.Evaluate[chromedp.Void](jsTestFixture),
 		eval(t, jsCheckFlame),
 	)
 	if err != nil {
@@ -99,9 +98,9 @@
 	server := makeTestServer(t, prof)
 	ctx := newContext(context.Background(), t)
 
-	err := chromedp.Run(ctx,
+	err := chromedp.Do(ctx,
 		chromedp.Navigate(server.URL+"/source?f=F3"),
-		chromedp.WaitVisible(`#content`, chromedp.ByID),
+		chromedp.WaitVisible(chromedp.ID(`#content`)),
 		matchRegexp(t, "#content", `F3`),            // Header
 		matchRegexp(t, "#content", `Total:.*100ms`), // Total for function
 		matchRegexp(t, "#content", `\b22\b.*100ms`), // Line 22
@@ -135,10 +134,9 @@
 
 // matchRegexp is a chromedp.Action that fetches the text of the first
 // node that matched query and checks that the text matches regexp re.
-func matchRegexp(t *testing.T, query, re string) chromedp.ActionFunc {
-	return func(ctx context.Context) error {
-		var value string
-		err := chromedp.Text(query, &value, chromedp.ByQuery).Do(ctx)
+func matchRegexp(t *testing.T, query, re string) chromedp.Action[chromedp.Void] {
+	return chromedp.Func(func(ctx context.Context, target *chromedp.Target) error {
+		value, err := chromedp.Text(chromedp.CSS(query))(ctx, target)
 		if err != nil {
 			return fmt.Errorf("text %s: %v", query, err)
 		}
@@ -151,16 +149,15 @@
 			return fmt.Errorf("%s: did not find %q in\n%s", query, re, value)
 		}
 		return nil
-	}
+	})
 }
 
 // matchInOrder is a chromedp.Action that fetches the text of the first
 // node that matched query and checks that the supplied sequence of
 // strings occur in order in the text.
-func matchInOrder(t *testing.T, query string, sequence ...string) chromedp.ActionFunc {
-	return func(ctx context.Context) error {
-		var value string
-		err := chromedp.Text(query, &value, chromedp.ByQuery).Do(ctx)
+func matchInOrder(t *testing.T, query string, sequence ...string) chromedp.Action[chromedp.Void] {
+	return chromedp.Func(func(ctx context.Context, target *chromedp.Target) error {
+		value, err := chromedp.Text(chromedp.CSS(query))(ctx, target)
 		if err != nil {
 			return fmt.Errorf("text %s: %v", query, err)
 		}
@@ -174,16 +171,15 @@
 			remaining = remaining[pos+len(s):]
 		}
 		return nil
-	}
+	})
 }
 
 // eval runs the specified javascript in the browser. The javascript must
 // return an [][]any, where each of the []any starts with either "LOG" or
 // "ERROR" (see testdata/testfixture.js).
-func eval(t *testing.T, js string) chromedp.ActionFunc {
-	return func(ctx context.Context) error {
-		var result [][]any
-		err := chromedp.Evaluate(js, &result).Do(ctx)
+func eval(t *testing.T, js string) chromedp.Action[chromedp.Void] {
+	return chromedp.Func(func(ctx context.Context, target *chromedp.Target) error {
+		result, err := chromedp.Evaluate[[][]any](js)(ctx, target)
 		if err != nil {
 			return err
 		}
@@ -197,7 +193,7 @@
 			}
 		}
 		return nil
-	}
+	})
 }
 
 //go:embed testdata/testfixture.js
diff --git a/browsertests/go.mod b/browsertests/go.mod
index 87aa0dd..97b006d 100644
--- a/browsertests/go.mod
+++ b/browsertests/go.mod
@@ -6,17 +6,12 @@
 replace github.com/google/pprof => ../
 
 require (
-	github.com/chromedp/chromedp v0.13.6
+	github.com/chromedp/chromedp v0.20.1
 	github.com/google/pprof v0.0.0
 )
 
 require (
-	github.com/chromedp/cdproto v0.0.0-20250403032234-65de8f5d025b // indirect
-	github.com/chromedp/sysutil v1.1.0 // indirect
-	github.com/go-json-experiment/json v0.0.0-20250211171154-1ae217ad3535 // indirect
-	github.com/gobwas/httphead v0.1.0 // indirect
-	github.com/gobwas/pool v0.2.1 // indirect
-	github.com/gobwas/ws v1.4.0 // indirect
+	github.com/chromedp/cdproto v0.157.8 // indirect
+	github.com/go-json-experiment/json v0.0.0-20260213210345-44df1a37e875 // indirect
 	github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b // indirect
-	golang.org/x/sys v0.32.0 // indirect
 )
diff --git a/browsertests/go.sum b/browsertests/go.sum
index ec9e228..f8231e4 100644
--- a/browsertests/go.sum
+++ b/browsertests/go.sum
@@ -1,23 +1,8 @@
-github.com/chromedp/cdproto v0.0.0-20250403032234-65de8f5d025b h1:jJmiCljLNTaq/O1ju9Bzz2MPpFlmiTn0F7LwCoeDZVw=
-github.com/chromedp/cdproto v0.0.0-20250403032234-65de8f5d025b/go.mod h1:NItd7aLkcfOA/dcMXvl8p1u+lQqioRMq/SqDp71Pb/k=
-github.com/chromedp/chromedp v0.13.6 h1:xlNunMyzS5bu3r/QKrb3fzX6ow3WBQ6oao+J65PGZxk=
-github.com/chromedp/chromedp v0.13.6/go.mod h1:h8GPP6ZtLMLsU8zFbTcb7ZDGCvCy8j/vRoFmRltQx9A=
-github.com/chromedp/sysutil v1.1.0 h1:PUFNv5EcprjqXZD9nJb9b/c9ibAbxiYo4exNWZyipwM=
-github.com/chromedp/sysutil v1.1.0/go.mod h1:WiThHUdltqCNKGc4gaU50XgYjwjYIhKWoHGPTUfWTJ8=
-github.com/go-json-experiment/json v0.0.0-20250211171154-1ae217ad3535 h1:yE7argOs92u+sSCRgqqe6eF+cDaVhSPlioy1UkA0p/w=
-github.com/go-json-experiment/json v0.0.0-20250211171154-1ae217ad3535/go.mod h1:BWmvoE1Xia34f3l/ibJweyhrT+aROb/FQ6d+37F0e2s=
-github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
-github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
-github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
-github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
-github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
-github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
+github.com/chromedp/cdproto v0.157.8 h1:Tkq0AjsUlC3Z4sJfHBzV/uAAxnTF/AZyuSTjfV/1gvk=
+github.com/chromedp/cdproto v0.157.8/go.mod h1:h68JaIuFr9o3yiayxEYhBdvaxgYO3shDrPSYhNlyfu0=
+github.com/chromedp/chromedp v0.20.1 h1:983T9wmyM09JtROWlxhLQwljKOQovqt8CVE89W3U0NA=
+github.com/chromedp/chromedp v0.20.1/go.mod h1:6z1Y5FdKUxRzxx2qcC5h1xjaBJrSWrZp1mjgITfNZig=
+github.com/go-json-experiment/json v0.0.0-20260213210345-44df1a37e875 h1:XGPtjxqp0FS8jj1Z7QGcSOSgyq1fUPjNyJXvi3KfI4A=
+github.com/go-json-experiment/json v0.0.0-20260213210345-44df1a37e875/go.mod h1:uNVvRXArCGbZ508SxYYTC5v1JWoz2voff5pm25jU1Ok=
 github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b h1:ogbOPx86mIhFy764gGkqnkFC8m5PJA7sPzlk9ppLVQA=
 github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
-github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo=
-github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
-github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde h1:x0TT0RDC7UhAVbbWWBzr41ElhJx5tXPWkIHA2HWPRuw=
-github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
-golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
-golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=