refactor: remove private webContents.getId() API (#13674)
This commit is contained in:
parent
a88cdf2d1f
commit
305e3aad40
12 changed files with 14 additions and 45 deletions
|
@ -40,7 +40,7 @@ describe('webContents module', () => {
|
|||
it('returns an array of web contents', (done) => {
|
||||
w.webContents.on('devtools-opened', () => {
|
||||
const all = webContents.getAllWebContents().sort((a, b) => {
|
||||
return a.getId() - b.getId()
|
||||
return a.id - b.id
|
||||
})
|
||||
|
||||
assert.ok(all.length >= 4)
|
||||
|
@ -61,15 +61,15 @@ describe('webContents module', () => {
|
|||
if (isCi) return done()
|
||||
|
||||
const specWebContents = remote.getCurrentWebContents()
|
||||
assert.equal(specWebContents.getId(), webContents.getFocusedWebContents().getId())
|
||||
assert.equal(specWebContents.id, webContents.getFocusedWebContents().id)
|
||||
|
||||
specWebContents.once('devtools-opened', () => {
|
||||
assert.equal(specWebContents.devToolsWebContents.getId(), webContents.getFocusedWebContents().getId())
|
||||
assert.equal(specWebContents.devToolsWebContents.id, webContents.getFocusedWebContents().id)
|
||||
specWebContents.closeDevTools()
|
||||
})
|
||||
|
||||
specWebContents.once('devtools-closed', () => {
|
||||
assert.equal(specWebContents.getId(), webContents.getFocusedWebContents().getId())
|
||||
assert.equal(specWebContents.id, webContents.getFocusedWebContents().id)
|
||||
done()
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue