Update chromium-spec.js
This commit is contained in:
parent
9b3960fe90
commit
26fedcf8da
1 changed files with 2 additions and 5 deletions
|
@ -965,7 +965,6 @@ describe('chromium feature', () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function testPDFIsLoadedInSubFrame (page, preloadFile, done) {
|
function testPDFIsLoadedInSubFrame (page, preloadFile, done) {
|
||||||
const pagePath = url.format({
|
const pagePath = url.format({
|
||||||
pathname: path.join(fixtures, 'pages', page).replace(/\\/g, '/'),
|
pathname: path.join(fixtures, 'pages', page).replace(/\\/g, '/'),
|
||||||
|
@ -991,7 +990,7 @@ describe('chromium feature', () => {
|
||||||
it('opens when loading a pdf resource as top level navigation', function (done) {
|
it('opens when loading a pdf resource as top level navigation', function (done) {
|
||||||
createBrowserWindow({plugins: true, preload: 'preload-pdf-loaded.js'})
|
createBrowserWindow({plugins: true, preload: 'preload-pdf-loaded.js'})
|
||||||
ipcMain.once('pdf-loaded', function (event, state) {
|
ipcMain.once('pdf-loaded', function (event, state) {
|
||||||
assert.equal(state, 'success')
|
assert.equal(state, 'success')
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
w.webContents.on('page-title-updated', () => {
|
w.webContents.on('page-title-updated', () => {
|
||||||
|
@ -1004,11 +1003,10 @@ describe('chromium feature', () => {
|
||||||
w.webContents.loadURL(pdfSource)
|
w.webContents.loadURL(pdfSource)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
it('opens a pdf link given params, the query string should be escaped', function (done) {
|
it('opens a pdf link given params, the query string should be escaped', function (done) {
|
||||||
createBrowserWindow({plugins: true, preload: 'preload-pdf-loaded.js'})
|
createBrowserWindow({plugins: true, preload: 'preload-pdf-loaded.js'})
|
||||||
ipcMain.once('pdf-loaded', function (event, state) {
|
ipcMain.once('pdf-loaded', function (event, state) {
|
||||||
assert.equal(state, 'success')
|
assert.equal(state, 'success')
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
w.webContents.on('page-title-updated', () => {
|
w.webContents.on('page-title-updated', () => {
|
||||||
|
@ -1023,7 +1021,6 @@ describe('chromium feature', () => {
|
||||||
w.webContents.loadURL(pdfSourceWithParams)
|
w.webContents.loadURL(pdfSourceWithParams)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
it('should download a pdf when plugins are disabled', function (done) {
|
it('should download a pdf when plugins are disabled', function (done) {
|
||||||
createBrowserWindow({plugins: false, preload: 'preload-pdf-loaded.js'})
|
createBrowserWindow({plugins: false, preload: 'preload-pdf-loaded.js'})
|
||||||
ipcRenderer.sendSync('set-download-option', false, false)
|
ipcRenderer.sendSync('set-download-option', false, false)
|
||||||
|
|
Loading…
Reference in a new issue