chore: remove promisification deprecation callbacks (#17907)
* chore: remove promisification deprecation callbacks * update docs * fix smoke test * fix executejs issue * cleanup leftovers * fix webContents.executeJavaScript tests * cleanup WebContents.prototype.takeHeapSnapshot * fix "sets arbitrary webContents as devtools" test * fix executeJavaScriptInFrame related tests
This commit is contained in:
parent
fdf5f838f4
commit
d87b3ead76
44 changed files with 94 additions and 1418 deletions
|
@ -686,27 +686,11 @@ describe('protocol module', () => {
|
|||
assert.strictEqual(result, true)
|
||||
})
|
||||
|
||||
// TODO(codebytere): remove when promisification is complete
|
||||
it('returns true for about: (callback)', (done) => {
|
||||
protocol.isProtocolHandled('about', (result) => {
|
||||
assert.strictEqual(result, true)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('returns true for file:', async () => {
|
||||
const result = await protocol.isProtocolHandled('file')
|
||||
assert.strictEqual(result, true)
|
||||
})
|
||||
|
||||
// TODO(codebytere): remove when promisification is complete
|
||||
it('returns true for file: (callback)', (done) => {
|
||||
protocol.isProtocolHandled('file', (result) => {
|
||||
assert.strictEqual(result, true)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('returns true for http:', async () => {
|
||||
const result = await protocol.isProtocolHandled('http')
|
||||
assert.strictEqual(result, true)
|
||||
|
@ -732,18 +716,6 @@ describe('protocol module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
// TODO(codebytere): remove when promisification is complete
|
||||
it('returns true for custom protocol (callback)', (done) => {
|
||||
const emptyHandler = (request, callback) => callback()
|
||||
protocol.registerStringProtocol(protocolName, emptyHandler, (error) => {
|
||||
assert.strictEqual(error, null)
|
||||
protocol.isProtocolHandled(protocolName, (result) => {
|
||||
assert.strictEqual(result, true)
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('returns true for intercepted protocol', (done) => {
|
||||
const emptyHandler = (request, callback) => callback()
|
||||
protocol.interceptStringProtocol('http', emptyHandler, async (error) => {
|
||||
|
@ -753,18 +725,6 @@ describe('protocol module', () => {
|
|||
done()
|
||||
})
|
||||
})
|
||||
|
||||
// TODO(codebytere): remove when promisification is complete
|
||||
it('returns true for intercepted protocol (callback)', (done) => {
|
||||
const emptyHandler = (request, callback) => callback()
|
||||
protocol.interceptStringProtocol('http', emptyHandler, (error) => {
|
||||
assert.strictEqual(error, null)
|
||||
protocol.isProtocolHandled('http', (result) => {
|
||||
assert.strictEqual(result, true)
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('protocol.intercept(Any)Protocol', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue