forked from ChromeDevTools/chrome-devtools-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathisolated_context_test.ts
More file actions
28 lines (25 loc) · 799 Bytes
/
isolated_context_test.ts
File metadata and controls
28 lines (25 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import assert from 'node:assert';
import type {TestScenario} from '../eval_gemini.ts';
export const scenario: TestScenario = {
prompt:
'Create a new page <TEST_URL> in an isolated context called contextB. Take a screenshot there.',
maxTurns: 3,
htmlRoute: {
path: '/test.html',
htmlContent: `
<h1>test</h1>
`,
},
expectations: calls => {
console.log(JSON.stringify(calls, null, 2))
assert.strictEqual(calls.length, 2);
assert.ok(calls[0].name === 'new_page', 'First call should be navigation');
assert.deepStrictEqual(calls[0].args.isolatedContext, "contextB");
assert.ok(calls[1].name === 'take_screenshot', 'Second call should be a screenshot');
},
};