mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: add osProcessId / name properties to webFrameMain (#26093)
* feat: add osProcessId / name properties to webFrameMain * Update docs/api/web-frame-main.md Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
@@ -216,7 +216,7 @@ ifdescribe(process.platform !== 'linux')('cross-site frame sandboxing', () => {
|
||||
await w.loadURL(serverUrl);
|
||||
|
||||
const pidMain = w.webContents.getOSProcessId();
|
||||
const pidFrame = (w.webContents as any)._getOSProcessIdForFrame('frame', crossSiteUrl);
|
||||
const pidFrame = w.webContents.mainFrame.frames.find(f => f.name === 'frame')!.osProcessId;
|
||||
|
||||
const metrics = app.getAppMetrics();
|
||||
const isProcessSandboxed = function (pid: number) {
|
||||
|
||||
@@ -127,6 +127,8 @@ describe('webFrameMain module', () => {
|
||||
await w.loadFile(path.join(subframesPath, 'frame.html'));
|
||||
const webFrame = w.webContents.mainFrame;
|
||||
expect(webFrame).to.haveOwnProperty('frameTreeNodeId');
|
||||
expect(webFrame).to.haveOwnProperty('name');
|
||||
expect(webFrame).to.haveOwnProperty('osProcessId');
|
||||
expect(webFrame).to.haveOwnProperty('processId');
|
||||
expect(webFrame).to.haveOwnProperty('routingId');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user