chore: enable PuppeteerUtil test for BiDi (#10686)
This commit is contained in:
parent
64a3b04b7a
commit
4a0a2bb2db
@ -3964,5 +3964,11 @@
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["cdp", "chrome", "headless"],
|
||||
"expectations": ["FAIL", "PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[injected.spec] PuppeteerUtil tests *",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
}
|
||||
]
|
||||
|
@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import expect from 'expect';
|
||||
import {PUPPETEER_WORLD} from 'puppeteer-core/internal/common/IsolatedWorlds.js';
|
||||
import {LazyArg} from 'puppeteer-core/internal/common/LazyArg.js';
|
||||
|
||||
import {getTestState, setupTestBrowserHooks} from './mocha-utils.js';
|
||||
@ -26,7 +25,7 @@ describe('PuppeteerUtil tests', function () {
|
||||
it('should work', async () => {
|
||||
const {page} = await getTestState();
|
||||
|
||||
const world = page.mainFrame().worlds[PUPPETEER_WORLD];
|
||||
const world = page.mainFrame().isolatedRealm();
|
||||
const value = await world.evaluate(
|
||||
PuppeteerUtil => {
|
||||
return typeof PuppeteerUtil === 'object';
|
||||
@ -42,7 +41,7 @@ describe('PuppeteerUtil tests', function () {
|
||||
it('should work', async () => {
|
||||
const {page} = await getTestState();
|
||||
|
||||
const world = page.mainFrame().worlds[PUPPETEER_WORLD];
|
||||
const world = page.mainFrame().isolatedRealm();
|
||||
const value = await world.evaluate(
|
||||
({createFunction}, fnString) => {
|
||||
return createFunction(fnString)(4);
|
||||
|
Loading…
Reference in New Issue
Block a user