Skip to content

Commit 1b07d0e

Browse files
author
Lusa Zhan
committed
Merge branch 'upstream/main' into lighthouse-agentic-browsing
2 parents 4667438 + a90378a commit 1b07d0e

63 files changed

Lines changed: 1498 additions & 1205 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fetch-depth: 2
2020

2121
- name: Set up Node.js
22-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
22+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2323
with:
2424
cache: npm
2525
node-version-file: '.nvmrc'

.github/workflows/presubmit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fetch-depth: 2
2222

2323
- name: Set up Node.js
24-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
24+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2525
with:
2626
cache: npm
2727
node-version-file: '.nvmrc'
@@ -43,7 +43,7 @@ jobs:
4343
fetch-depth: 2
4444

4545
- name: Set up Node.js
46-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
46+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
4747
with:
4848
cache: npm
4949
node-version-file: '.nvmrc'

.github/workflows/publish-to-npm-on-tag.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
fetch-depth: 2
3131

3232
- name: Set up Node.js
33-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
33+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3434
with:
3535
cache: npm
3636
node-version-file: '.nvmrc'
@@ -59,7 +59,7 @@ jobs:
5959
fetch-depth: 2
6060

6161
- name: Set up Node.js
62-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
62+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
6363
with:
6464
cache: npm
6565
node-version-file: '.nvmrc'

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
release-please:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: googleapis/release-please-action@v4
13+
- uses: googleapis/release-please-action@v5
1414
with:
1515
token: ${{ secrets.BROWSER_AUTOMATION_BOT_TOKEN }}
1616
target-branch: main

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fetch-depth: 2
3333

3434
- name: Set up Node.js
35-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
35+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3636
with:
3737
cache: npm
3838
node-version: 22 # build works only with 22+.
@@ -47,7 +47,7 @@ jobs:
4747
NODE_OPTIONS: '--max_old_space_size=4096'
4848

4949
- name: Set up Node.js
50-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
50+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
5151
with:
5252
cache: npm
5353
node-version: ${{ matrix.node }}

docs/tool-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ in the DevTools Elements panel (if any).
398398

399399
## Extensions
400400

401-
> NOTE: Extensions are not active by default. Use the '--category-extensions' flag
401+
> NOTE: Extensions are not active by default. Use the '--categoryExtensions' flag
402402
403403
### `install_extension`
404404

package-lock.json

Lines changed: 60 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,18 @@
1616
"typecheck": "tsc --noEmit",
1717
"format": "eslint --cache --fix . && prettier --write --cache .",
1818
"check-format": "eslint --cache . && prettier --check --cache .;",
19-
"gen": "npm run build && npm run docs:generate && npm run cli:generate && npm run update-tool-call-metrics && npm run update-flag-usage-metrics && npm run format",
19+
"gen": "npm run build && npm run docs:generate && npm run cli:generate && npm run update-metrics && npm run format",
2020
"docs:generate": "node --experimental-strip-types scripts/generate-docs.ts",
21-
"start": "npm run build && node build/src/index.js",
22-
"start-debug": "DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/index.js",
21+
"start": "npm run build && node build/src/bin/chrome-devtools-mcp.js",
22+
"start-debug": "DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/bin/chrome-devtools-mcp.js",
2323
"test": "npm run build && node scripts/test.mjs",
2424
"test:no-build": "node scripts/test.mjs",
2525
"test:only": "npm run build && node scripts/test.mjs --test-only",
2626
"test:update-snapshots": "npm run build && node scripts/test.mjs --test-update-snapshots",
2727
"prepare": "node --experimental-strip-types scripts/prepare.ts",
2828
"verify-server-json-version": "node --experimental-strip-types scripts/verify-server-json-version.ts",
2929
"update-lighthouse": "node --experimental-strip-types scripts/update-lighthouse.ts",
30-
"update-tool-call-metrics": "node --experimental-strip-types scripts/update_tool_call_metrics.ts",
31-
"update-flag-usage-metrics": "node --experimental-strip-types scripts/update_flag_usage_metrics.ts",
30+
"update-metrics": "node --experimental-strip-types scripts/update_metrics.ts",
3231
"verify-npm-package": "node scripts/verify-npm-package.mjs",
3332
"eval": "npm run build && node --experimental-strip-types scripts/eval_gemini.ts",
3433
"count-tokens": "node --experimental-strip-types scripts/count_tokens.ts"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/**
2+
* @license
3+
* Copyright 2026 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
import assert from 'node:assert';
8+
9+
import type {TestScenario} from '../eval_gemini.ts';
10+
11+
export const scenario: TestScenario = {
12+
prompt:
13+
'Go to <TEST_URL>, fill the form with size = 2 CPUs and components = [docker, nginx].',
14+
maxTurns: 3,
15+
htmlRoute: {
16+
path: '/input_test.html',
17+
htmlContent: `
18+
<form action="/post" method="POST">
19+
<div>
20+
<label for="size">CPU/Memory size:</label>
21+
<select id="size" name="size" required>
22+
<option value="small">1 vCPU, 2GB RAM</option>
23+
<option value="medium">2 vCPU, 4GB RAM</option>
24+
<option value="large">4 vCPU, 8GB RAM</option>
25+
</select>
26+
</div>
27+
<br>
28+
<div>
29+
<p>Pre-installed components:</p>
30+
<input type="checkbox" id="docker" name="components" value="docker">
31+
<label for="docker">Docker</label><br>
32+
<input type="checkbox" id="nodejs" name="components" value="nodejs">
33+
<label for="nodejs">Node.js</label><br>
34+
<input type="checkbox" id="python" name="components" value="python">
35+
<label for="python">Python</label><br>
36+
<input type="checkbox" id="nginx" name="components" value="nginx">
37+
<label for="nginx">Nginx</label>
38+
</div>
39+
<button type="submit">Spawn Server</button>
40+
</form>
41+
`,
42+
},
43+
expectations: calls => {
44+
assert.strictEqual(calls.length, 3);
45+
assert.ok(
46+
calls[0].name === 'navigate_page' || calls[0].name === 'new_page',
47+
);
48+
assert.strictEqual(calls[1].name, 'take_snapshot');
49+
assert.strictEqual(calls[2].name, 'fill_form');
50+
51+
const elements = calls[2].args.elements as Array<{
52+
uid: string;
53+
value: string;
54+
}>;
55+
assert.strictEqual(elements.length, 3);
56+
57+
const uids = new Set(elements.map(e => e.uid));
58+
assert.strictEqual(
59+
uids.size,
60+
3,
61+
'fill_form should target three distinct elements',
62+
);
63+
64+
const values = elements.map(e => e.value).sort();
65+
assert.deepStrictEqual(values, ['2 vCPU, 4GB RAM', 'true', 'true']);
66+
},
67+
};

0 commit comments

Comments
 (0)