parent
6fec36d8ba
commit
4e8d074c2f
@ -115,6 +115,7 @@ export class DOMWorld {
|
|||||||
|
|
||||||
async _setContext(context?: ExecutionContext): Promise<void> {
|
async _setContext(context?: ExecutionContext): Promise<void> {
|
||||||
if (context) {
|
if (context) {
|
||||||
|
this._ctxBindings = new Set();
|
||||||
this._contextResolveCallback.call(null, context);
|
this._contextResolveCallback.call(null, context);
|
||||||
this._contextResolveCallback = null;
|
this._contextResolveCallback = null;
|
||||||
for (const waitTask of this._waitTasks) waitTask.rerun();
|
for (const waitTask of this._waitTasks) waitTask.rerun();
|
||||||
|
@ -195,6 +195,22 @@ describeChromeOnly('AriaQueryHandler', () => {
|
|||||||
await page.waitForSelector('aria/[role="button"]');
|
await page.waitForSelector('aria/[role="button"]');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should persist query handler bindings across navigations', async () => {
|
||||||
|
const { page, server } = getTestState();
|
||||||
|
|
||||||
|
// Reset page but make sure that execution context ids start with 1.
|
||||||
|
await page.goto('data:text/html,');
|
||||||
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
await page.evaluate(addElement, 'button');
|
||||||
|
await page.waitForSelector('aria/[role="button"]');
|
||||||
|
|
||||||
|
// Reset page but again make sure that execution context ids start with 1.
|
||||||
|
await page.goto('data:text/html,');
|
||||||
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
await page.evaluate(addElement, 'button');
|
||||||
|
await page.waitForSelector('aria/[role="button"]');
|
||||||
|
});
|
||||||
|
|
||||||
it('should work independently of `exposeFunction`', async () => {
|
it('should work independently of `exposeFunction`', async () => {
|
||||||
const { page, server } = getTestState();
|
const { page, server } = getTestState();
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user