]> khamidou — GitHub mirrors - electron.git/commitdiff
spec,win: Fix page-favicon-updated event spec
authorCheng Zhao <zcbenz@gmail.com>
Wed, 29 Apr 2015 09:31:56 +0000 (17:31 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 29 Apr 2015 09:31:56 +0000 (17:31 +0800)
spec/webview-spec.coffee

index ea50f632b31c2ebb2dd90f489f9a76a84199113c..51058ad695e9bd4822c21a97148283612dd8ab6d 100644 (file)
@@ -169,7 +169,12 @@ describe '<webview> tag', ->
     it 'emits when favicon urls are received', (done) ->
       webview.addEventListener 'page-favicon-updated', (e) ->
         assert.equal e.favicons.length, 2
-        assert.equal e.favicons[0], 'file:///favicon.png'
+        url =
+          if process.platform is 'win32'
+            'file:///C:/favicon.png'
+          else
+            'file:///favicon.png'
+        assert.equal e.favicons[0], url
         done()
       webview.src = "file://#{fixtures}/pages/a.html"
       document.body.appendChild webview