Index: test_runner.js |
diff --git a/test_runner.js b/test_runner.js |
index 094c7b93296276b1d24cc9d5e73ecfecd3b248d9..2e0d6c4865690fba6b4cf219498196b732114749 100644 |
--- a/test_runner.js |
+++ b/test_runner.js |
@@ -21,7 +21,6 @@ |
const fs = require("fs"); |
const path = require("path"); |
-const url = require("url"); |
const nodeunit = require("nodeunit"); |
@@ -56,34 +55,10 @@ function addTestPaths(testPaths, recurse) |
} |
} |
-function getFileURL(filePath) |
-{ |
- return url.format({ |
- protocol: "file", |
- slashes: "true", |
- pathname: path.resolve(process.cwd(), filePath).split(path.sep).join("/") |
- }); |
-} |
- |
function runBrowserTests() |
{ |
- if (!browserFiles.length) |
- return; |
- |
- // Navigate to this directory because about:blank won't be allowed to load |
- // file:/// URLs. |
- let initialPage = getFileURL(__dirname); |
- let bootstrapPath = path.join(__dirname, "test", "browser", |
- "_bootstrap.js"); |
- let nodeunitPath = path.join( |
- path.dirname(require.resolve("nodeunit")), |
- "examples", "browser", "nodeunit.js" |
- ); |
- let args = [ |
- getFileURL(nodeunitPath), |
- ...browserFiles.map(getFileURL) |
- ]; |
- return chromiumProcess(initialPage, bootstrapPath, args); |
+ if (browserFiles.length) |
+ return chromiumProcess(browserFiles); |
} |
if (process.argv.length > 2) |