Skip to content

fix(chromium): preserve main frame on unknown iframe parent - #42992

Closed
SivaShankar A V (sivashankarav) wants to merge 1 commit into
microsoft:mainfrom
sivashankarav:fix-cdp-iframe-42955
Closed

SivaShankar A V (sivashankarav) wants to merge 1 commit into
microsoft:mainfrom
sivashankarav:fix-cdp-iframe-42955

Conversation

@sivashankarav

Copy link
Copy Markdown

Summary

  • Skip attaching an iframe target when its parent frame is not registered during CDP connection, rather than replacing the page's main frame.
  • Add a regression test connecting to a preloaded page with nested cross-site and sandboxed iframes.

Fixes #42955

Test plan

  • CRPATH=/usr/bin/google-chrome npm run ctest -- --project=chromium-library tests/library/chromium/connect-over-cdp.spec.ts -g 'should not replace the main frame' --repeat-each=3 --reporter=line (3 passed)
  • Existing CDP iframe and page-title controls passed.
  • TypeScript and ESLint checks timed out in this environment.

@dgozman

Copy link
Copy Markdown
Collaborator

Closing in favor of #43000.

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.

[Bug]: connectOverCDP replaces the page's main frame with a nested sandboxed iframe when its parentFrameId is unknown

2 participants