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

Unified Diff: tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/test/xml.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/test/xml.js
diff --git a/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/test/xml.js b/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/test/xml.js
new file mode 100644
index 0000000000000000000000000000000000000000..d3a0bea6fbd01b465e98952e59017192c7854b6e
--- /dev/null
+++ b/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/test/xml.js
@@ -0,0 +1,27 @@
+var expect = require('expect.js'),
+ _ = require('underscore'),
+ cheerio = require('../lib/cheerio');
+
+var xml = function(str, options) {
+ options = _.extend({ xmlMode: true }, options);
+ var dom = cheerio.load(str, options);
+ return dom.xml();
+};
+
+describe('render', function() {
+
+ describe('(xml)', function() {
+
+ it('should render <media:thumbnail /> tags correctly', function() {
+ var str = '<media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123" />';
+ expect(xml(str)).to.equal('<media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123"/>');
+ });
+
+ it('should render <link /> tags (RSS) correctly', function() {
+ var str = '<link>http://www.github.com/</link>';
+ expect(xml(str)).to.equal('<link>http://www.github.com/</link>');
+ });
+
+ });
+
+});

Powered by Google App Engine
This is Rietveld 408576698