Implement webContents.savePage API.
This commit is contained in:
parent
ddea2fced4
commit
facd0fbc08
8 changed files with 210 additions and 0 deletions
|
@ -301,3 +301,15 @@ describe 'browser-window module', ->
|
|||
assert.notEqual data.length, 0
|
||||
w.webContents.endFrameSubscription()
|
||||
done()
|
||||
|
||||
describe 'save page', ->
|
||||
savePagePath = path.join fixtures, 'save_page.html'
|
||||
it 'should save page', (done) ->
|
||||
w.webContents.on 'did-finish-load', ->
|
||||
w.webContents.savePage savePagePath, 'HTMLComplete', (error) ->
|
||||
assert.equal error, null
|
||||
assert fs.existsSync savePagePath
|
||||
fs.unlinkSync savePagePath
|
||||
done()
|
||||
|
||||
w.loadUrl "file://#{fixtures}/api/blank.html"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue