Support opening file: URLs directly

This commit is contained in:
Kevin Sawicki 2016-02-04 10:34:36 -08:00
parent 312182e0bd
commit b74dd43ff5

View file

@ -281,7 +281,7 @@ if (option.file && !option.webdriver) {
var file = option.file;
var protocol = url.parse(file).protocol;
var extension = path.extname(file);
if (protocol === 'http:' || protocol === 'https:') {
if (protocol === 'http:' || protocol === 'https:' || protocol === 'file:') {
loadApplicationByUrl(file);
} else if (extension === '.html' || extension === '.htm') {
loadApplicationByUrl('file://' + path.resolve(file));