updates tests
This commit is contained in:
parent
5754f3aea0
commit
afb551e94a
1 changed files with 4 additions and 4 deletions
|
@ -670,12 +670,12 @@ describe('browser-window module', function () {
|
||||||
let called = false
|
let called = false
|
||||||
w.loadURL('file://' + fixtures + '/api/frame-subscriber.html')
|
w.loadURL('file://' + fixtures + '/api/frame-subscriber.html')
|
||||||
w.webContents.on('dom-ready', function () {
|
w.webContents.on('dom-ready', function () {
|
||||||
w.webContents.beginFrameSubscription(function (data) {
|
w.webContents.beginFrameSubscription(function (image) {
|
||||||
// This callback might be called twice.
|
// This callback might be called twice.
|
||||||
if (called) return
|
if (called) return
|
||||||
called = true
|
called = true
|
||||||
|
|
||||||
assert.notEqual(data.length, 0)
|
assert.equal(image.isEmpty(), false)
|
||||||
w.webContents.endFrameSubscription()
|
w.webContents.endFrameSubscription()
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
@ -686,12 +686,12 @@ describe('browser-window module', function () {
|
||||||
let called = false
|
let called = false
|
||||||
w.loadURL('file://' + fixtures + '/api/frame-subscriber.html')
|
w.loadURL('file://' + fixtures + '/api/frame-subscriber.html')
|
||||||
w.webContents.on('dom-ready', function () {
|
w.webContents.on('dom-ready', function () {
|
||||||
w.webContents.beginFrameSubscription(true, function (data) {
|
w.webContents.beginFrameSubscription(true, function (image) {
|
||||||
// This callback might be called twice.
|
// This callback might be called twice.
|
||||||
if (called) return
|
if (called) return
|
||||||
called = true
|
called = true
|
||||||
|
|
||||||
assert.notEqual(data.length, 0)
|
assert.equal(image.isEmpty(), false)
|
||||||
w.webContents.endFrameSubscription()
|
w.webContents.endFrameSubscription()
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue