Browse Source

test: remove non-applicable processMemoryInfo specs (#17679)

Shelley Vohr 6 years ago
parent
commit
c4020308c9
2 changed files with 0 additions and 38 deletions
  1. 0 23
      spec/api-browser-window-spec.js
  2. 0 15
      spec/fixtures/api/sandbox.html

+ 0 - 23
spec/api-browser-window-spec.js

@@ -1837,29 +1837,6 @@ describe('BrowserWindow module', () => {
         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
       it('properly manages remote object references after page reload', (done) => {
         w.destroy()

+ 0 - 15
spec/fixtures/api/sandbox.html

@@ -35,21 +35,6 @@
         await invokeGc()
         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': () => {
         document.title = 'changed'
       },