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

This commit is contained in:
Dmitry Gozman 2024-04-23 14:11:45 -07:00
parent b52cd7e4dc
commit 67eaa17079

View file

@ -251,7 +251,8 @@ export class FFPage implements PageDelegate {
const context = this._contextIdToContext.get(executionContextId); const context = this._contextIdToContext.get(executionContextId);
if (!context) if (!context)
return; 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) { _onDialogOpened(params: Protocol.Page.dialogOpenedPayload) {