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