From 210f40dd5338cccadb7f3159ba4838babfd6c7c1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 14 Feb 2017 19:58:42 +0900 Subject: [PATCH] Convert "\" to "/" in file:// url --- spec/chromium-spec.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 971ba9a7711c..07ff7335be68 100644 --- a/spec/chromium-spec.js +++ b/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({