Merge pull request #6865 from electron/test-for-request-headers-without-path-expansion

Add test for header with . characters
This commit is contained in:
Kevin Sawicki 2016-08-16 10:05:48 -07:00 committed by GitHub
commit 959613bb04

View file

@ -164,10 +164,14 @@ describe('webRequest module', function () {
it('receives details object', function (done) {
ses.webRequest.onBeforeSendHeaders(function (details, callback) {
assert.equal(typeof details.requestHeaders, 'object')
assert.equal(details.requestHeaders['Foo.Bar'], 'baz')
callback({})
})
$.ajax({
url: defaultURL,
headers: {
'Foo.Bar': 'baz'
},
success: function (data) {
assert.equal(data, '/')
done()