Merge pull request #8799 from nitsakh/baseURLForDataURL

Support base URL option to loadURL for data URLs
This commit is contained in:
Kevin Sawicki 2017-03-06 10:25:53 -08:00 committed by GitHub
commit f549bda9fc
6 changed files with 18 additions and 0 deletions

View file

@ -283,6 +283,14 @@ describe('BrowserWindow module', function () {
w.loadURL(server.url)
})
})
it('should support support base url for data urls', (done) => {
ipcMain.once('answer', function (event, test) {
assert.equal(test, 'test')
done()
})
w.loadURL('data:text/html,<script src="loaded-from-dataurl.js"></script>', {baseURLForDataURL: `file://${path.join(fixtures, 'api')}${path.sep}`})
})
})
describe('will-navigate event', function () {