chore: revert webFrameMain.executeJavaScriptInIsolatedWorld method (#27926)
This commit is contained in:
parent
5f43c1dab8
commit
84d0e827a3
4 changed files with 0 additions and 73 deletions
|
@ -148,19 +148,6 @@ describe('webFrameMain module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('WebFrame.executeJavaScriptInIsolatedWorld', () => {
|
||||
it('can inject code into any subframe', async () => {
|
||||
const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } });
|
||||
await w.loadFile(path.join(subframesPath, 'frame-with-frame-container.html'));
|
||||
const webFrame = w.webContents.mainFrame;
|
||||
|
||||
const getUrl = (frame: WebFrameMain) => frame.executeJavaScriptInIsolatedWorld(999, 'location.href');
|
||||
expect(await getUrl(webFrame)).to.equal(fileUrl('frame-with-frame-container.html'));
|
||||
expect(await getUrl(webFrame.frames[0])).to.equal(fileUrl('frame-with-frame.html'));
|
||||
expect(await getUrl(webFrame.frames[0].frames[0])).to.equal(fileUrl('frame.html'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('WebFrame.reload', () => {
|
||||
it('reloads a frame', async () => {
|
||||
const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue