Open Bug 1896326 Opened 2 months ago Updated 1 month ago

GlobalThis !== window in sandbox realms

Categories

(Remote Protocol :: WebDriver BiDi, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: alexrudenko, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({
  product: 'firefox',
  protocol: 'webDriverBiDi',
});

const page = await browser.newPage();
await page.goto('https://example.com');


console.log('main', await page.mainFrame().mainRealm().evaluate(() => {
  return window === globalThis;
}));

console.log('sandobx', await page.mainFrame().isolatedRealm().evaluate(() => {
  return window === globalThis;
}));

await browser.close();

Expected:
True for both main and isolated realm.

Actual:
The condition is true only for the main realm.

This blocks the browsingContext.locateNodes for a11y locator unit tests for Puppeteer.

The severity field is not set for this bug.
:whimboo, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(hskupin)
See Also: → 1208775
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.