Browse Source

Convert "\" to "/" in file:// url

Cheng Zhao 8 years ago
parent
commit
210f40dd53
1 changed files with 5 additions and 1 deletions
  1. 5 1
      spec/chromium-spec.js

+ 5 - 1
spec/chromium-spec.js

@@ -805,7 +805,11 @@ describe('chromium feature', function () {
 
   describe('PDF Viewer', function () {
     let w = null
-    const pdfSource = `file://${fixtures}/assets/pdf.pdf`
+    const pdfSource = url.format({
+      pathname: path.join(fixtures, 'assets', 'pdf.pdf').replace(/\\/g, '/'),
+      protocol: 'file',
+      slashes: true
+    })
 
     beforeEach(function () {
       w = new BrowserWindow({