mirror of
https://github.com/electron/electron.git
synced 2026-01-25 07:18:18 -05:00
Add failing spec for insertCSS
This commit is contained in:
committed by
Birunthan Mohanathas
parent
2f5acfedcd
commit
017df93ffa
@@ -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()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user