mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: prepare to language ports roll (#36211)
This commit is contained in:
parent
e313b8b1e8
commit
3ab097b54e
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -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';
|
||||
@ -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}`,
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user