Add failing spec for insertCSS

This commit is contained in:
Kevin Sawicki 2016-12-19 15:48:32 -08:00 committed by Birunthan Mohanathas
parent 2f5acfedcd
commit 017df93ffa

View file

@ -268,4 +268,13 @@ describe('webContents module', function () {
w.webContents.sendInputEvent({type: 'char', keyCode: 'Z', modifiers: ['shift', 'ctrl']})
})
})
it('supports inserting CSS', function (done) {
w.loadURL('about:blank')
w.webContents.insertCSS('body { background-repeat: round; }')
w.webContents.executeJavaScript('window.getComputedStyle(document.body).getPropertyValue("background-repeat")', (result) => {
assert.equal(result, 'round')
done()
})
})
})