Skip to content

Commit

Permalink
Revert "Modify tests about zoom persistence to properly simulate cros…
Browse files Browse the repository at this point in the history
…s-origin navigation"

This reverts commit 0a7537f.
  • Loading branch information
alexstrat committed May 28, 2019
1 parent 707f613 commit a9bc966
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions spec/api-web-contents-spec.js
Expand Up @@ -7,7 +7,6 @@ const http = require('http')
const path = require('path')
const { closeWindow } = require('./window-helpers')
const { emittedOnce } = require('./events-helpers')
const { createNetworkSandbox } = require('./network-helper')
const chai = require('chai')
const dirtyChai = require('dirty-chai')

Expand Down Expand Up @@ -743,11 +742,6 @@ describe('webContents module', () => {
})

it('cannot persist zoom level after navigation with webFrame', (done) => {
const protocol = session.defaultSession.protocol
const sandbox = createNetworkSandbox(protocol)
sandbox.serveFileFromProtocol('ccc', path.join(fixtures, 'pages', 'c.html'))
sandbox.serveFileFromProtocol('ddd', path.join(fixtures, 'pages', 'd.html'))

let initialNavigation = true
const source = `
const {ipcRenderer, webFrame} = require('electron')
Expand All @@ -760,16 +754,15 @@ describe('webContents module', () => {
} else {
const zoomLevel = w.webContents.getZoomLevel()
expect(zoomLevel).to.equal(0)
sandbox.reset()
done()
}
})
ipcMain.once('zoom-level-set', (e, zoomLevel) => {
expect(zoomLevel).to.equal(0.6)
w.loadURL('ddd://page')
w.loadFile(path.join(fixtures, 'pages', 'd.html'))
initialNavigation = false
})
w.loadURL('ccc://page')
w.loadFile(path.join(fixtures, 'pages', 'c.html'))
})
})

Expand Down

0 comments on commit a9bc966

Please sign in to comment.