 
   describe 'did-navigate-in-page event', ->
     it 'emits when an anchor link is clicked', (done) ->
-      pageUrl = "file://#{fixtures}/pages/webview-did-navigate-in-page.html"
+      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()

      document.body.appendChild webview

    it 'emits when window.location.hash is changed', (done) ->
      pageUrl = "file://#{fixtures}/pages/webview-did-navigate-in-page-with-hash.html"
      webview.addEventListener 'did-navigate-in-page', (e) ->
        assert.equal e.url, "#{pageUrl}#test"
        done()

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

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