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: prepare to language ports roll (#36211)
Dmitry Gozman3ab097b54eb7
diff --git a/packages/playwright-core/src/client/network.ts b/packages/playwright-core/src/client/network.tsindex f2314f1328..4e9ea285ce 100644--- a/packages/playwright-core/src/client/network.ts+++ b/packages/playwright-core/src/client/network.ts@@ -346,9 +346,7 @@ export class Route extends ChannelOwner<channels.RouteChannel> implements api.Roasync fulfill(options: { response?: api.APIResponse, status?: number, headers?: Headers, contentType?: string, body?: string | Buffer, json?: any, path?: string } = {}) {await this._handleRoute(async () => {- await this._wrapApiCall(async () => {- await this._innerFulfill(options);- }, { internal: true });+ await this._innerFulfill(options);});}diff --git a/packages/playwright-core/src/server/dispatchers/dispatcher.ts b/packages/playwright-core/src/server/dispatchers/dispatcher.tsindex b73c07bae1..ca1db256e9 100644--- a/packages/playwright-core/src/server/dispatchers/dispatcher.ts+++ b/packages/playwright-core/src/server/dispatchers/dispatcher.ts@@ -24,6 +24,7 @@ import { TargetClosedError, isTargetClosedError, serializeError } from '../errorimport { SdkObject } from '../instrumentation';import { isProtocolError } from '../protocolError';import { compressCallLog } from '../callLog';+import { methodMetainfo } from '../../utils/isomorphic/protocolMetainfo';import type { CallMetadata } from '../instrumentation';import type { PlaywrightDispatcher } from './playwrightDispatcher';@@ -304,6 +305,12 @@ export class DispatcherConnection {return;}+ if (methodMetainfo.get(dispatcher._type + '.' + method)?.internal) {+ // For non-js ports, it is easier to detect internal calls here rather+ // than generate protocol metainfo for each language.+ validMetadata.internal = true;+ }+const sdkObject = dispatcher._object instanceof SdkObject ? dispatcher._object : undefined;const callMetadata: CallMetadata = {id: `call@${id}`,diff --git a/utils/generate_dotnet_channels.js b/utils/generate_dotnet_channels.jsindex b6f0b7716e..15a04af5f1 100644--- a/utils/generate_dotnet_channels.js+++ b/utils/generate_dotnet_channels.js@@ -136,7 +136,7 @@ function properties(properties, indent, onlyOptional, parentName, level) {if (name === 'android' || name === 'electron')continue;if (name.startsWith('$mixin')) {- visitProperties(mixins.get(value).properties, parentName + toTitleCase(name));+ visitProperties(mixins.get(value).properties, parentName);continue;}const inner = inlineType(value, indent, parentName + toTitleCase(name), level + 1);