Merge pull request #8695 from ericbrumer/master

[Win] Allow favicon.png to be on the root of any drive letter
This commit is contained in:
Kevin Sawicki 2017-02-16 11:56:52 -08:00 committed by GitHub
commit 8fe025d6c9

View file

@ -523,8 +523,11 @@ describe('<webview> tag', function () {
it('emits when favicon urls are received', function (done) { it('emits when favicon urls are received', function (done) {
webview.addEventListener('page-favicon-updated', function (e) { webview.addEventListener('page-favicon-updated', function (e) {
assert.equal(e.favicons.length, 2) assert.equal(e.favicons.length, 2)
var pageUrl = process.platform === 'win32' ? 'file:///C:/favicon.png' : 'file:///favicon.png' if (process.platform === 'win32') {
assert.equal(e.favicons[0], pageUrl) assert(/^file:\/\/\/[A-Z]:\/favicon.png$/i.test(e.favicons[0]))
} else {
assert.equal(e.favicons[0], 'file:///favicon.png')
}
done() done()
}) })
webview.src = 'file://' + fixtures + '/pages/a.html' webview.src = 'file://' + fixtures + '/pages/a.html'