test: remove non-applicable processMemoryInfo specs (#17679)
This commit is contained in:
parent
9c3cb55ef2
commit
c4020308c9
2 changed files with 0 additions and 38 deletions
|
@ -1837,29 +1837,6 @@ describe('BrowserWindow module', () => {
|
||||||
w.loadFile(path.join(fixtures, 'pages', 'window-open.html'))
|
w.loadFile(path.join(fixtures, 'pages', 'window-open.html'))
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO(alexeykuzmin): `GetProcessMemoryInfo()` is not available starting Ch67.
|
|
||||||
xit('releases memory after popup is closed', (done) => {
|
|
||||||
w.destroy()
|
|
||||||
w = new BrowserWindow({
|
|
||||||
show: false,
|
|
||||||
webPreferences: {
|
|
||||||
preload,
|
|
||||||
sandbox: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
w.loadFile(path.join(fixtures, 'api', 'sandbox.html'), { search: 'allocate-memory' })
|
|
||||||
ipcMain.once('answer', function (event, { bytesBeforeOpen, bytesAfterOpen, bytesAfterClose }) {
|
|
||||||
const memoryIncreaseByOpen = bytesAfterOpen - bytesBeforeOpen
|
|
||||||
const memoryDecreaseByClose = bytesAfterOpen - bytesAfterClose
|
|
||||||
// decreased memory should be less than increased due to factors we
|
|
||||||
// can't control, but given the amount of memory allocated in the
|
|
||||||
// fixture, we can reasonably expect decrease to be at least 70% of
|
|
||||||
// increase
|
|
||||||
assert(memoryDecreaseByClose > memoryIncreaseByOpen * 0.7)
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// see #9387
|
// see #9387
|
||||||
it('properly manages remote object references after page reload', (done) => {
|
it('properly manages remote object references after page reload', (done) => {
|
||||||
w.destroy()
|
w.destroy()
|
||||||
|
|
15
spec/fixtures/api/sandbox.html
vendored
15
spec/fixtures/api/sandbox.html
vendored
|
@ -35,21 +35,6 @@
|
||||||
await invokeGc()
|
await invokeGc()
|
||||||
ipcRenderer.send('answer', new Hello().say())
|
ipcRenderer.send('answer', new Hello().say())
|
||||||
},
|
},
|
||||||
// FIXME: Chromium 67 - getProcessMemoryInfo has been removed
|
|
||||||
// 'allocate-memory': async () => {
|
|
||||||
// await invokeGc()
|
|
||||||
// const {privateBytes: bytesBeforeOpen} = process.getProcessMemoryInfo()
|
|
||||||
// let w = open('./allocate-memory.html')
|
|
||||||
// await invokeGc()
|
|
||||||
// const {privateBytes: bytesAfterOpen} = process.getProcessMemoryInfo()
|
|
||||||
// w.close()
|
|
||||||
// w = null
|
|
||||||
// await invokeGc()
|
|
||||||
// const {privateBytes: bytesAfterClose} = process.getProcessMemoryInfo()
|
|
||||||
// ipcRenderer.send('answer', {
|
|
||||||
// bytesBeforeOpen, bytesAfterOpen, bytesAfterClose
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
'window-events': () => {
|
'window-events': () => {
|
||||||
document.title = 'changed'
|
document.title = 'changed'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue