fix(firefox): "warn" console messages should be "warning" (#30490)

Fixes #30136.
This commit is contained in:
Dmitry Gozman 2024-04-23 15:07:29 -07:00 committed by GitHub
parent 4514b7e3ed
commit 25b881cd10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -251,7 +251,8 @@ export class FFPage implements PageDelegate {
const context = this._contextIdToContext.get(executionContextId);
if (!context)
return;
this._page._addConsoleMessage(type, args.map(arg => context.createHandle(arg)), location);
// Juggler reports 'warn' for some internal messages generated by the browser.
this._page._addConsoleMessage(type === 'warn' ? 'warning' : type, args.map(arg => context.createHandle(arg)), location);
}
_onDialogOpened(params: Protocol.Page.dialogOpenedPayload) {