Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: remove unused potentiallyClosesScope metainfo flag (#41345)
Dmitry Gozmanbefa08af587e
diff --git a/packages/isomorphic/protocolMetainfo.ts b/packages/isomorphic/protocolMetainfo.tsindex 95683a55ac..37fe231666 100644--- a/packages/isomorphic/protocolMetainfo.ts+++ b/packages/isomorphic/protocolMetainfo.ts@@ -16,7 +16,7 @@// This file is generated by generate_channels.js, do not edit manually.-export type MethodMetainfo = { internal?: boolean, title?: string, slowMo?: boolean, snapshot?: boolean, pause?: boolean, isAutoWaiting?: boolean, input?: boolean, potentiallyClosesScope?: boolean, group?: string };+export type MethodMetainfo = { internal?: boolean, title?: string, slowMo?: boolean, snapshot?: boolean, pause?: boolean, isAutoWaiting?: boolean, input?: boolean, group?: string };export const methodMetainfo = new Map<string, MethodMetainfo>([['Android.devices', { internal: true, }],@@ -51,22 +51,22 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([['APIRequestContext.fetchLog', { internal: true, }],['APIRequestContext.storageState', { title: 'Get storage state', group: 'configuration', }],['APIRequestContext.disposeAPIResponse', { internal: true, }],- ['APIRequestContext.dispose', { internal: true, potentiallyClosesScope: true, }],+ ['APIRequestContext.dispose', { internal: true, }],['Artifact.pathAfterFinished', { internal: true, }],['Artifact.saveAs', { internal: true, }],['Artifact.saveAsStream', { internal: true, }],['Artifact.failure', { internal: true, }],['Artifact.stream', { internal: true, }],['Artifact.cancel', { internal: true, }],- ['Artifact.delete', { internal: true, potentiallyClosesScope: true, }],+ ['Artifact.delete', { internal: true, }],['Stream.read', { internal: true, }],['Stream.close', { internal: true, }],['WritableStream.write', { internal: true, }],['WritableStream.close', { internal: true, }],['Browser.startServer', { title: 'Start server', }],['Browser.stopServer', { title: 'Stop server', }],- ['Browser.close', { title: 'Close browser', pause: true, potentiallyClosesScope: true, }],- ['Browser.killForTests', { internal: true, potentiallyClosesScope: true, }],+ ['Browser.close', { title: 'Close browser', pause: true, }],+ ['Browser.killForTests', { internal: true, }],['Browser.defaultUserAgentForTest', { internal: true, }],['Browser.newContext', { title: 'Create context', }],['Browser.newContextForReuse', { internal: true, }],@@ -78,7 +78,7 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([['BrowserContext.addInitScript', { title: 'Add init script', group: 'configuration', }],['BrowserContext.clearCookies', { title: 'Clear cookies', group: 'configuration', }],['BrowserContext.clearPermissions', { title: 'Clear permissions', group: 'configuration', }],- ['BrowserContext.close', { title: 'Close context', pause: true, potentiallyClosesScope: true, }],+ ['BrowserContext.close', { title: 'Close context', pause: true, }],['BrowserContext.cookies', { title: 'Get cookies', group: 'getter', }],['BrowserContext.exposeBinding', { title: 'Expose binding', group: 'configuration', }],['BrowserContext.grantPermissions', { title: 'Grant permissions', group: 'configuration', }],@@ -115,7 +115,7 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([['BrowserType.launchPersistentContext', { title: 'Launch persistent context', }],['BrowserType.connectOverCDP', { title: 'Connect over CDP', }],['BrowserType.connectToWorker', { title: 'Connect to worker', }],- ['Disposable.dispose', { internal: true, potentiallyClosesScope: true, }],+ ['Disposable.dispose', { internal: true, }],['Electron.launch', { title: 'Launch electron', }],['ElectronApplication.browserWindow', { internal: true, }],['ElectronApplication.evaluateExpression', { title: 'Evaluate', }],@@ -128,7 +128,7 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([['Frame.ariaSnapshot', { title: 'Aria snapshot', group: 'getter', }],['Frame.blur', { title: 'Blur', slowMo: true, snapshot: true, pause: true, }],['Frame.check', { title: 'Check', slowMo: true, snapshot: true, pause: true, input: true, isAutoWaiting: true, }],- ['Frame.click', { title: 'Click', slowMo: true, snapshot: true, pause: true, input: true, isAutoWaiting: true, potentiallyClosesScope: true, }],+ ['Frame.click', { title: 'Click', slowMo: true, snapshot: true, pause: true, input: true, isAutoWaiting: true, }],['Frame.content', { title: 'Get content', snapshot: true, pause: true, }],['Frame.dragAndDrop', { title: 'Drag and drop', slowMo: true, snapshot: true, pause: true, input: true, isAutoWaiting: true, }],['Frame.drop', { title: 'Drop files or data onto an element', slowMo: true, snapshot: true, pause: true, input: true, isAutoWaiting: true, }],@@ -170,8 +170,8 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([['Frame.waitForFunction', { title: 'Wait for function', snapshot: true, pause: true, }],['Frame.waitForSelector', { title: 'Wait for selector', snapshot: true, }],['Frame.expect', { title: 'Expect "{expression}"', snapshot: true, pause: true, }],- ['JSHandle.dispose', { internal: true, potentiallyClosesScope: true, }],- ['ElementHandle.dispose', { internal: true, potentiallyClosesScope: true, }],+ ['JSHandle.dispose', { internal: true, }],+ ['ElementHandle.dispose', { internal: true, }],['JSHandle.evaluateExpression', { title: 'Evaluate', snapshot: true, pause: true, }],['ElementHandle.evaluateExpression', { title: 'Evaluate', snapshot: true, pause: true, }],['JSHandle.evaluateExpressionHandle', { title: 'Evaluate', snapshot: true, pause: true, }],@@ -247,7 +247,7 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([['Response.httpVersion', { internal: true, }],['Response.sizes', { internal: true, }],['Page.addInitScript', { title: 'Add init script', group: 'configuration', }],- ['Page.close', { title: 'Close page', pause: true, potentiallyClosesScope: true, }],+ ['Page.close', { title: 'Close page', pause: true, }],['Page.runBeforeUnload', { title: 'Run beforeunload', pause: true, }],['Page.clearConsoleMessages', { title: 'Clear console messages', }],['Page.consoleMessages', { title: 'Get console messages', group: 'getter', }],@@ -321,7 +321,7 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([['JsonPipe.send', { internal: true, }],['JsonPipe.close', { internal: true, }],['CDPSession.send', { title: 'Send CDP command', group: 'configuration', }],- ['CDPSession.detach', { title: 'Detach CDP session', potentiallyClosesScope: true, group: 'configuration', }],+ ['CDPSession.detach', { title: 'Detach CDP session', group: 'configuration', }],['BindingCall.reject', { internal: true, }],['BindingCall.resolve', { internal: true, }],['Debugger.requestPause', { title: 'Pause on next call', group: 'configuration', }],@@ -338,7 +338,7 @@ export const methodMetainfo = new Map<string, MethodMetainfo>([['Tracing.tracingStop', { title: 'Stop tracing', group: 'configuration', }],['Tracing.harStart', { internal: true, }],['Tracing.harExport', { internal: true, }],- ['Worker.disconnect', { title: 'Disconnect from worker', potentiallyClosesScope: true, }],+ ['Worker.disconnect', { title: 'Disconnect from worker', }],['Worker.evaluateExpression', { title: 'Evaluate', }],['Worker.evaluateExpressionHandle', { title: 'Evaluate', }],['Worker.updateSubscription', { internal: true, }]diff --git a/packages/protocol/spec/api.yml b/packages/protocol/spec/api.ymlindex c92ad1b99f..6e8ff2281d 100644--- a/packages/protocol/spec/api.yml+++ b/packages/protocol/spec/api.yml@@ -87,8 +87,6 @@ APIRequestContext:internal: trueparameters:reason: string?- flags:- potentiallyClosesScope: trueAPIResponse:type: objectdiff --git a/packages/protocol/spec/artifact.yml b/packages/protocol/spec/artifact.ymlindex e33531ab42..a7bafe4874 100644--- a/packages/protocol/spec/artifact.yml+++ b/packages/protocol/spec/artifact.yml@@ -52,8 +52,6 @@ Artifact:delete:internal: true- flags:- potentiallyClosesScope: trueStream:type: interfacediff --git a/packages/protocol/spec/browser.yml b/packages/protocol/spec/browser.ymlindex d3c292b68f..bc0b862165 100644--- a/packages/protocol/spec/browser.yml+++ b/packages/protocol/spec/browser.yml@@ -47,12 +47,9 @@ Browser:reason: string?flags:pause: true- potentiallyClosesScope: truekillForTests:internal: true- flags:- potentiallyClosesScope: truedefaultUserAgentForTest:internal: truediff --git a/packages/protocol/spec/browserContext.yml b/packages/protocol/spec/browserContext.ymlindex b930f2a6bc..27ccc577d6 100644--- a/packages/protocol/spec/browserContext.yml+++ b/packages/protocol/spec/browserContext.yml@@ -66,7 +66,6 @@ BrowserContext:reason: string?flags:pause: true- potentiallyClosesScope: truecookies:title: Get cookiesdiff --git a/packages/protocol/spec/core.yml b/packages/protocol/spec/core.ymlindex 7ede28aaae..b97078ea76 100644--- a/packages/protocol/spec/core.yml+++ b/packages/protocol/spec/core.yml@@ -49,8 +49,6 @@ Disposable:dispose:internal: true- flags:- potentiallyClosesScope: trueWaitInfo:type: objectdiff --git a/packages/protocol/spec/frame.yml b/packages/protocol/spec/frame.ymlindex 706f1d810a..eb0917e05e 100644--- a/packages/protocol/spec/frame.yml+++ b/packages/protocol/spec/frame.yml@@ -155,7 +155,6 @@ Frame:pause: trueinput: trueisAutoWaiting: true- potentiallyClosesScope: truecontent:title: Get contentdiff --git a/packages/protocol/spec/handles.yml b/packages/protocol/spec/handles.ymlindex 1a4a77fb4c..edab0387c6 100644--- a/packages/protocol/spec/handles.yml+++ b/packages/protocol/spec/handles.yml@@ -22,8 +22,6 @@ JSHandle:dispose:internal: true- flags:- potentiallyClosesScope: trueevaluateExpression:title: Evaluatediff --git a/packages/protocol/spec/page.yml b/packages/protocol/spec/page.ymlindex 045373af56..22ec5a2d53 100644--- a/packages/protocol/spec/page.yml+++ b/packages/protocol/spec/page.yml@@ -42,7 +42,6 @@ Page:reason: string?flags:pause: true- potentiallyClosesScope: truerunBeforeUnload:title: Run beforeunloaddiff --git a/packages/protocol/spec/playwright.yml b/packages/protocol/spec/playwright.ymlindex fdf4436609..287f3714d4 100644--- a/packages/protocol/spec/playwright.yml+++ b/packages/protocol/spec/playwright.yml@@ -396,8 +396,6 @@ CDPSession:detach:title: Detach CDP sessiongroup: configuration- flags:- potentiallyClosesScope: trueevents:diff --git a/packages/protocol/spec/worker.yml b/packages/protocol/spec/worker.ymlindex 9cf07d9365..5b3c675f7c 100644--- a/packages/protocol/spec/worker.yml+++ b/packages/protocol/spec/worker.yml@@ -24,8 +24,6 @@ Worker:title: Disconnect from workerparameters:reason: string?- flags:- potentiallyClosesScope: trueevaluateExpression:title: Evaluatediff --git a/utils/generate_channels.js b/utils/generate_channels.jsindex 33856d271f..0b2a0173ba 100755--- a/utils/generate_channels.js+++ b/utils/generate_channels.js@@ -321,8 +321,7 @@ for (const [name, item] of Object.entries(protocol)) {const pauseProp = method.flags?.pause ? ` pause: ${method.flags.pause},` : '';const inputProp = method.flags?.input ? ` input: ${method.flags.input},` : '';const isAutoWaitingProp = method.flags?.isAutoWaiting ? ` isAutoWaiting: ${method.flags.isAutoWaiting},` : '';- const potentiallyClosesScopeProp = method.flags?.potentiallyClosesScope ? ` potentiallyClosesScope: ${method.flags.potentiallyClosesScope},` : '';- methodMetainfo.push(`['${className + '.' + methodName}', {${internalProp}${titleProp}${slowMoProp}${snapshotProp}${pauseProp}${inputProp}${isAutoWaitingProp}${potentiallyClosesScopeProp}${groupProp} }]`);+ methodMetainfo.push(`['${className + '.' + methodName}', {${internalProp}${titleProp}${slowMoProp}${snapshotProp}${pauseProp}${inputProp}${isAutoWaitingProp}${groupProp} }]`);}const parameters = objectType(method.parameters || {}, '');@@ -375,7 +374,7 @@ for (const [name, item] of Object.entries(protocol)) {}}-metainfo_ts.push(`export type MethodMetainfo = { internal?: boolean, title?: string, slowMo?: boolean, snapshot?: boolean, pause?: boolean, isAutoWaiting?: boolean, input?: boolean, potentiallyClosesScope?: boolean, group?: string };+metainfo_ts.push(`export type MethodMetainfo = { internal?: boolean, title?: string, slowMo?: boolean, snapshot?: boolean, pause?: boolean, isAutoWaiting?: boolean, input?: boolean, group?: string };export const methodMetainfo = new Map<string, MethodMetainfo>([${methodMetainfo.join(`,\n `)}