Use getCurrentWebContents()
This commit is contained in:
parent
446e3f06c9
commit
d9e15151fb
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ const assert = require('assert')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
const {remote} = require('electron')
|
const {remote} = require('electron')
|
||||||
const {BrowserWindow, webContents, getCurrentWindow} = remote
|
const {BrowserWindow, webContents} = remote
|
||||||
|
|
||||||
var isCi = remote.getGlobal('isCi')
|
var isCi = remote.getGlobal('isCi')
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ describe('webContents module', function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
it('returns the focused web contents', function (done) {
|
it('returns the focused web contents', function (done) {
|
||||||
var specWebContents = getCurrentWindow().webContents
|
var specWebContents = remote.getCurrentWebContents()
|
||||||
assert.equal(specWebContents.getId(), webContents.getFocusedWebContents().getId())
|
assert.equal(specWebContents.getId(), webContents.getFocusedWebContents().getId())
|
||||||
|
|
||||||
specWebContents.on('devtools-opened', function () {
|
specWebContents.on('devtools-opened', function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue