fix(capture): retain Electron observations and HAR resource failures
This commit is contained in:
@@ -10,6 +10,7 @@ const temporary: string[] = [];
|
||||
|
||||
const electronModuleSource = `const { EventEmitter } = require("node:events");
|
||||
const app = new EventEmitter();
|
||||
app.isReady = () => true;
|
||||
app.relaunch = () => undefined;
|
||||
app.setAsDefaultProtocolClient = () => true;
|
||||
app.setLoginItemSettings = () => undefined;
|
||||
@@ -40,6 +41,8 @@ class BrowserWindow extends EventEmitter {
|
||||
this.id = 3;
|
||||
this.webContents = new WebContents();
|
||||
this.options = options;
|
||||
this.webContents.getLastWebPreferences = () => options.webPreferences;
|
||||
app.emit("browser-window-created", {}, this);
|
||||
}
|
||||
}
|
||||
const utilityProcess = {
|
||||
@@ -66,7 +69,7 @@ const contextBridge = {
|
||||
};
|
||||
module.exports = {
|
||||
app,
|
||||
BrowserWindow,
|
||||
get BrowserWindow() { return BrowserWindow; },
|
||||
contextBridge,
|
||||
ipcMain,
|
||||
ipcRenderer,
|
||||
|
||||
@@ -266,7 +266,7 @@ it("cancels after snapshot acquisition before launch and removes private input d
|
||||
|
||||
it.each([
|
||||
{ reason: "input-limit", tag: "AnalysisInputError" },
|
||||
{ reason: "resource-limit", tag: "ProviderAdapterError" },
|
||||
{ reason: "resource-limit", tag: "AnalysisResourceConstraintError" },
|
||||
{ reason: "decoder", tag: "ProviderAdapterError" },
|
||||
{ reason: "limit", tag: "AnalysisOutputError" },
|
||||
])(
|
||||
|
||||
Reference in New Issue
Block a user