Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test_runner.js

Issue 29517687: Issue 5079, 5516 - Use webpack for browser tests, modules for content scripts (Closed)
Patch Set: Created Aug. 16, 2017, 3:40 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« test/browser/elemHideEmulation.js ('K') | « test/browser/elemHideEmulation.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« test/browser/elemHideEmulation.js ('K') | « test/browser/elemHideEmulation.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld