Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/playwright-core/src/client/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,7 @@ export class Route extends ChannelOwner<channels.RouteChannel> implements api.Ro

async 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);
});
}

Expand Down
7 changes: 7 additions & 0 deletions packages/playwright-core/src/server/dispatchers/dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { TargetClosedError, isTargetClosedError, serializeError } from '../error
import { 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';
Expand Down Expand Up @@ -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}`,
Expand Down
2 changes: 1 addition & 1 deletion utils/generate_dotnet_channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading