Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/node_modules/htmlparser2/tests/02-stream.js

Issue 125733002: Add vulcanize to tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/node_modules/htmlparser2/tests/02-stream.js
diff --git a/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/node_modules/htmlparser2/tests/02-stream.js b/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/node_modules/htmlparser2/tests/02-stream.js
new file mode 100644
index 0000000000000000000000000000000000000000..fc22fedea97643b5cc786960b557b6ce665441c2
--- /dev/null
+++ b/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/node_modules/htmlparser2/tests/02-stream.js
@@ -0,0 +1,20 @@
+var helper = require("./test-helper.js"),
+ Stream = require("..").WritableStream,
+ fs = require("fs");
+
+exports.dir = "Stream";
+
+exports.test = function(test, cb){
+ fs.createReadStream(__dirname + test.file).pipe(
+ new Stream(
+ helper.getEventCollector(function(err, events){
+ cb(err, events);
+
+ var handler = helper.getEventCollector(cb),
+ stream = new Stream(handler, test.options);
+
+ stream.end(fs.readFileSync(__dirname + test.file));
+ }
+ ), test.options)
+ );
+};

Powered by Google App Engine
This is Rietveld 408576698