refactor: remove ServiceWorker APIs from WebContents (#16717)
This commit is contained in:
parent
3aa8ec0818
commit
f303caa87c
6 changed files with 0 additions and 103 deletions
|
@ -228,28 +228,6 @@ describe('webContents module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('ServiceWorker APIs', () => {
|
||||
it('can successfully check for presence of a ServiceWorker', async () => {
|
||||
await w.loadFile(path.join(fixtures, 'api', 'service-worker', 'service-worker.html'))
|
||||
const hasSW = await w.webContents.hasServiceWorker()
|
||||
expect(hasSW).to.be.true()
|
||||
})
|
||||
|
||||
it('throws properly for invalid url', async () => {
|
||||
const promise = w.webContents.hasServiceWorker()
|
||||
return expect(promise).to.be.eventually.rejectedWith(Error, 'URL invalid or not yet loaded.')
|
||||
})
|
||||
|
||||
it('can successfully check for presence of a ServiceWorker (callback)', (done) => {
|
||||
w.loadFile(path.join(fixtures, 'api', 'service-worker', 'service-worker.html')).then(() => {
|
||||
w.webContents.hasServiceWorker(hasSW => {
|
||||
expect(hasSW).to.be.true()
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('isCurrentlyAudible() API', () => {
|
||||
it('returns whether audio is playing', async () => {
|
||||
const webContents = remote.getCurrentWebContents()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue