From d97585d06dca54f7140e407ad48ce725bb71024b Mon Sep 17 00:00:00 2001 From: Eric Brumer Date: Wed, 15 Feb 2017 19:02:11 -0800 Subject: [PATCH] Allow favicon.png to be on the root of any drive letter --- spec/webview-spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 21a5401840..f25d949171 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -523,8 +523,11 @@ describe(' tag', function () { it('emits when favicon urls are received', function (done) { webview.addEventListener('page-favicon-updated', function (e) { assert.equal(e.favicons.length, 2) - var pageUrl = process.platform === 'win32' ? 'file:///C:/favicon.png' : 'file:///favicon.png' - assert.equal(e.favicons[0], pageUrl) + if (process.platform === 'win32') { + assert(/^file:\/\/\/[a-zA-Z]:\/favicon.png$/.test(e.favicons[0])) + } else { + assert.equal(e.favicons[0], 'file:///favicon.png') + } done() }) webview.src = 'file://' + fixtures + '/pages/a.html'