updates tests

This commit is contained in:
gellert 2016-09-09 23:40:10 +02:00
parent 5754f3aea0
commit afb551e94a

View file

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