fix failing download spec
This commit is contained in:
parent
e767c59da2
commit
3baa186c0a
1 changed files with 4 additions and 4 deletions
|
@ -313,11 +313,11 @@ describe('session module', function () {
|
||||||
fs.unlinkSync(downloadFilePath)
|
fs.unlinkSync(downloadFilePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
it('can download using BrowserWindow.loadURL', function (done) {
|
it('can download using WebContents.downloadURL', function (done) {
|
||||||
downloadServer.listen(0, '127.0.0.1', function () {
|
downloadServer.listen(0, '127.0.0.1', function () {
|
||||||
var port = downloadServer.address().port
|
var port = downloadServer.address().port
|
||||||
ipcRenderer.sendSync('set-download-option', false, false)
|
ipcRenderer.sendSync('set-download-option', false, false)
|
||||||
w.loadURL(url + ':' + port)
|
w.webContents.downloadURL(url + ':' + port)
|
||||||
ipcRenderer.once('download-done', function (event, state, url,
|
ipcRenderer.once('download-done', function (event, state, url,
|
||||||
mimeType, receivedBytes,
|
mimeType, receivedBytes,
|
||||||
totalBytes, disposition,
|
totalBytes, disposition,
|
||||||
|
@ -355,7 +355,7 @@ describe('session module', function () {
|
||||||
downloadServer.listen(0, '127.0.0.1', function () {
|
downloadServer.listen(0, '127.0.0.1', function () {
|
||||||
var port = downloadServer.address().port
|
var port = downloadServer.address().port
|
||||||
ipcRenderer.sendSync('set-download-option', true, false)
|
ipcRenderer.sendSync('set-download-option', true, false)
|
||||||
w.loadURL(url + ':' + port + '/')
|
w.webContents.downloadURL(url + ':' + port + '/')
|
||||||
ipcRenderer.once('download-done', function (event, state, url,
|
ipcRenderer.once('download-done', function (event, state, url,
|
||||||
mimeType, receivedBytes,
|
mimeType, receivedBytes,
|
||||||
totalBytes, disposition,
|
totalBytes, disposition,
|
||||||
|
@ -378,7 +378,7 @@ describe('session module', function () {
|
||||||
downloadServer.listen(0, '127.0.0.1', function () {
|
downloadServer.listen(0, '127.0.0.1', function () {
|
||||||
var port = downloadServer.address().port
|
var port = downloadServer.address().port
|
||||||
ipcRenderer.sendSync('set-download-option', true, false)
|
ipcRenderer.sendSync('set-download-option', true, false)
|
||||||
w.loadURL(url + ':' + port + '/?testFilename')
|
w.webContents.downloadURL(url + ':' + port + '/?testFilename')
|
||||||
ipcRenderer.once('download-done', function (event, state, url,
|
ipcRenderer.once('download-done', function (event, state, url,
|
||||||
mimeType, receivedBytes,
|
mimeType, receivedBytes,
|
||||||
totalBytes, disposition,
|
totalBytes, disposition,
|
||||||
|
|
Loading…
Reference in a new issue