Skip to content

Commit 9640004

Browse files
committed
chore: eval isolated context
1 parent 7a049be commit 9640004

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
'Create a new page <TEST_URL> in an isolated context called contextB. Take a screenshot there.',
14+
maxTurns: 3,
15+
htmlRoute: {
16+
path: '/test.html',
17+
htmlContent: `
18+
<h1>test</h1>
19+
`,
20+
},
21+
expectations: calls => {
22+
console.log(JSON.stringify(calls, null, 2))
23+
assert.strictEqual(calls.length, 2);
24+
assert.ok(calls[0].name === 'new_page', 'First call should be navigation');
25+
assert.deepStrictEqual(calls[0].args.isolatedContext, "contextB");
26+
assert.ok(calls[1].name === 'take_screenshot', 'Second call should be a screenshot');
27+
},
28+
};

0 commit comments

Comments
 (0)