Skip to content

fix: honor background when new_page uses isolatedContext - #2658

Merged
OrKoN merged 1 commit into
ChromeDevTools:mainfrom
baishiwen9:fix/background-isolated-context
Sep 4, 2026
Merged

OrKoN merged 1 commit into
ChromeDevTools:mainfrom
baishiwen9:fix/background-isolated-context

Conversation

@baishiwen9

Copy link
Copy Markdown
Contributor

Fixes #2657

Summary

  • BrowserContext.newPage() in Puppeteer 25.9 supports the background option, so pass it through in the isolated-context branch of McpContext.newPage() instead of dropping it.
  • Add a real-browser regression test asserting the original page keeps focus when new_page is called with both background: true and isolatedContext.

Testing

  • npm run typecheck
  • npm run test:no-build tests/tools/pages.test.ts
  • prettier + eslint pass

@google-cla

google-cla Bot commented Sep 4, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@baishiwen9
baishiwen9 force-pushed the fix/background-isolated-context branch from daf9e64 to f611181 Compare September 4, 2026 07:57
@OrKoN
OrKoN enabled auto-merge September 4, 2026 09:09
@OrKoN
OrKoN added this pull request to the merge queue Sep 4, 2026
Merged via the queue into ChromeDevTools:main with commit f215c82 Sep 4, 2026
20 checks passed
pull Bot pushed a commit to oogalieboogalie/chrome-devtools-mcp that referenced this pull request Sep 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.9.0](ChromeDevTools/chrome-devtools-mcp@chrome-devtools-mcp-v1.8.0...chrome-devtools-mcp-v1.9.0)
(2026-09-08)


### 🎉 Features

* Add --allow-unrestricted-paths by default for CLI
([ChromeDevTools#2618](ChromeDevTools#2618))
([2dc104c](ChromeDevTools@2dc104c))
* add Agent Plugins 1.0 package
([ChromeDevTools#2623](ChromeDevTools#2623))
([05d9e55](ChromeDevTools@05d9e55))
* add an option to turn off js execution tools
([ChromeDevTools#2627](ChromeDevTools#2627))
([a78566e](ChromeDevTools@a78566e))
* Add cookie-debugging skill and improve network/pages tool descriptions
([ChromeDevTools#2596](ChromeDevTools#2596))
([6a67552](ChromeDevTools@6a67552))
* add screencast fps option
([ChromeDevTools#2312](ChromeDevTools#2312))
([2e641d8](ChromeDevTools@2e641d8))
* extend --no-javascript-evaluation to cover navigations and initScripts
([ChromeDevTools#2638](ChromeDevTools#2638))
([4993a0f](ChromeDevTools@4993a0f))
* option to disable source maps
([ChromeDevTools#2628](ChromeDevTools#2628))
([4430a76](ChromeDevTools@4430a76))
* **performance:** set default trace buffer size to match DevTools
(1.2gb)
([ChromeDevTools#2614](ChromeDevTools#2614))
([d1baa90](ChromeDevTools@d1baa90))
* support configurable filesystem roots
([ChromeDevTools#2605](ChromeDevTools#2605))
([d00e6f8](ChromeDevTools@d00e6f8))


### 🛠️ Fixes

* detect scheduled script navigations
([ChromeDevTools#2622](ChromeDevTools#2622))
([1b2c0e5](ChromeDevTools@1b2c0e5))
* do not enable the DevTools frontend Audits subscription
([ChromeDevTools#2625](ChromeDevTools#2625))
([d1e73ff](ChromeDevTools@d1e73ff))
* filter out Chrome webui targets by default
([ChromeDevTools#2648](ChromeDevTools#2648))
([020c048](ChromeDevTools@020c048))
* honor background when new_page uses isolatedContext
([ChromeDevTools#2658](ChromeDevTools#2658))
([f215c82](ChromeDevTools@f215c82))
* **memory:** expliclity mention the need of a flag
([ChromeDevTools#2620](ChromeDevTools#2620))
([46c3e05](ChromeDevTools@46c3e05))
* truncate long urls in concise network request output
([ChromeDevTools#2513](ChromeDevTools#2513))
([552c870](ChromeDevTools@552c870))
* validate viewport and geolocation inputs in emulate tool
([ChromeDevTools#2663](ChromeDevTools#2663))
([808aed6](ChromeDevTools@808aed6)),
closes
[ChromeDevTools#2662](ChromeDevTools#2662)


### 📄 Documentation

* correct what --screenshotFormat reduces
([ChromeDevTools#2617](ChromeDevTools#2617))
([c575777](ChromeDevTools@c575777))
* split the docs in separate files
([ChromeDevTools#2600](ChromeDevTools#2600))
([5463101](ChromeDevTools@5463101))
* update agents.md for testing
([ChromeDevTools#2660](ChromeDevTools#2660))
([18ca912](ChromeDevTools@18ca912))
* update SECURITY.md
([ChromeDevTools#2626](ChromeDevTools#2626))
([fd67970](ChromeDevTools@fd67970))


### 🏗️ Refactor

* extract browser options
([ChromeDevTools#2654](ChromeDevTools#2654))
([a918b7b](ChromeDevTools@a918b7b))
* extract category config into a seprate file
([ChromeDevTools#2652](ChromeDevTools#2652))
([401a119](ChromeDevTools@401a119))
* move transform logic to Clearcut level
([ChromeDevTools#2637](ChromeDevTools#2637))
([f0058d5](ChromeDevTools@f0058d5))
* wrap Server into a class
([ChromeDevTools#2633](ChromeDevTools#2633))
([1a092ff](ChromeDevTools@1a092ff))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
pull Bot pushed a commit to Pet3cy/chrome-devtools-mcp that referenced this pull request Sep 10, 2026
…eDevTools#2676)

Fixes ChromeDevTools#2650

Alternative to ChromeDevTools#2655: that PR is currently failing all CI checks and its
diff reverts the `background` support added in ChromeDevTools#2658. This
implementation is based on the latest `main` and keeps that feature
intact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new_page silently ignores background when isolatedContext is set

4 participants