Skip to content

Commit e523161

Browse files
build(spec): update WebDriverBiDi types (#3530)
Automatically generated by https://github.com/GoogleChromeLabs/chromium-bidi/blob/main/.github/workflows/update-bidi-types.yml --------- Co-authored-by: Maksim Sadym <[email protected]>
1 parent 2560b3d commit e523161

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

src/bidiMapper/CommandProcessor.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ export class CommandProcessor extends EventEmitter<CommandProcessorEventsMap> {
316316
return await this.#emulationProcessor.setGeolocationOverride(
317317
this.#parser.parseSetGeolocationOverrideParams(command.params),
318318
);
319+
case 'emulation.setLocaleOverride':
320+
throw new UnknownErrorException(
321+
`Method ${command.method} is not implemented.`,
322+
);
319323
case 'emulation.setScreenOrientationOverride':
320324
return await this.#emulationProcessor.setScreenOrientationOverride(
321325
this.#parser.parseSetScreenOrientationOverrideParams(command.params),

src/protocol-parser/generated/webdriver-bidi.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,7 @@ export namespace BrowsingContext {
12131213
export const EmulationCommandSchema = z.lazy(() =>
12141214
z.union([
12151215
Emulation.SetGeolocationOverrideSchema,
1216+
Emulation.SetLocaleOverrideSchema,
12161217
Emulation.SetScreenOrientationOverrideSchema,
12171218
]),
12181219
);
@@ -1273,6 +1274,26 @@ export namespace Emulation {
12731274
}),
12741275
);
12751276
}
1277+
export namespace Emulation {
1278+
export const SetLocaleOverrideSchema = z.lazy(() =>
1279+
z.object({
1280+
method: z.literal('emulation.setLocaleOverride'),
1281+
params: Emulation.SetLocaleOverrideParametersSchema,
1282+
}),
1283+
);
1284+
}
1285+
export namespace Emulation {
1286+
export const SetLocaleOverrideParametersSchema = z.lazy(() =>
1287+
z.object({
1288+
locale: z.union([z.string(), z.null()]),
1289+
contexts: z
1290+
.array(BrowsingContext.BrowsingContextSchema)
1291+
.min(1)
1292+
.optional(),
1293+
userContexts: z.array(Browser.UserContextSchema).min(1).optional(),
1294+
}),
1295+
);
1296+
}
12761297
export namespace Emulation {
12771298
export const SetScreenOrientationOverrideSchema = z.lazy(() =>
12781299
z.object({

src/protocol/generated/webdriver-bidi.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,7 @@ export namespace BrowsingContext {
975975
}
976976
export type EmulationCommand =
977977
| Emulation.SetGeolocationOverride
978+
| Emulation.SetLocaleOverride
978979
| Emulation.SetScreenOrientationOverride;
979980
export namespace Emulation {
980981
export type SetGeolocationOverride = {
@@ -1043,6 +1044,22 @@ export namespace Emulation {
10431044
type: 'positionUnavailable';
10441045
};
10451046
}
1047+
export namespace Emulation {
1048+
export type SetLocaleOverride = {
1049+
method: 'emulation.setLocaleOverride';
1050+
params: Emulation.SetLocaleOverrideParameters;
1051+
};
1052+
}
1053+
export namespace Emulation {
1054+
export type SetLocaleOverrideParameters = {
1055+
locale: string | null;
1056+
contexts?: [
1057+
BrowsingContext.BrowsingContext,
1058+
...BrowsingContext.BrowsingContext[],
1059+
];
1060+
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
1061+
};
1062+
}
10461063
export namespace Emulation {
10471064
export type SetScreenOrientationOverride = {
10481065
method: 'emulation.setScreenOrientationOverride';

0 commit comments

Comments
 (0)