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