       document.body.appendChild webview
 
   describe 'did-navigate event', ->
-    pageUrl = "file://#{fixtures}/pages/webview-will-navigate.html"
+    p = path.join fixtures, 'pages', 'webview-will-navigate.html'
+    p = p.replace /\\/g, '/'
+    pageUrl = url.format protocol: 'file', slashes: true, pathname: p
 
     it 'emits when a url that leads to outside of the page is clicked', (done) ->
       webview.addEventListener 'did-navigate', (e) ->

assert = require 'assert'
path   = require 'path'
http   = require 'http'

describe '<webview> tag', ->
  @timeout 10000


  describe 'did-navigate-in-page event', ->
    it 'emits when an anchor link is clicked', (done) ->
      p = path.join fixtures, 'pages', 'webview-did-navigate-in-page.html'
      p = p.replace /\\/g, '/'
      pageUrl = url.format protocol: 'file', slashes: true, pathname: p

      webview.addEventListener 'did-navigate-in-page', (e) ->
        assert.equal e.url, "#{pageUrl}#test_content"
        done()
