refactor: remove ServiceWorker APIs from WebContents (#16717)

This commit is contained in:
Shelley Vohr 2019-02-04 22:22:46 -08:00 committed by GitHub
parent 3aa8ec0818
commit f303caa87c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 0 additions and 103 deletions

View file

@ -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()