Issue #8735:Support base URL option to loadURL for data URLs

This commit is contained in:
Nitish Sakhawalkar 2017-02-28 16:49:03 -08:00
parent 8e4bdec6b6
commit 879082b1a6
6 changed files with 122 additions and 106 deletions

View file

@ -256,6 +256,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})
})
it('sets the content type header on multi part forms', function (done) {
w.webContents.on('did-finish-load', () => {
w.webContents.session.webRequest.onBeforeSendHeaders((details, callback) => {