diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 21:49:04 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 21:49:04 +0200 |
commit | 39dac57259cff8b61db0b22cb2ad0a8adb02692e (patch) | |
tree | 52a026cc8c22793eb17fd0f5e22adce1ae08a1dd /toolkit/components/microformats/test/module-tests/html-test.js | |
parent | a1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff) | |
parent | c2d9ab62f3d097c9e0e00184cab1f546554f5eaa (diff) | |
download | UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.gz UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.lz UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.xz UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.zip |
Merge branch 'redwood' into 28.9-platform
Diffstat (limited to 'toolkit/components/microformats/test/module-tests/html-test.js')
-rw-r--r-- | toolkit/components/microformats/test/module-tests/html-test.js | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/toolkit/components/microformats/test/module-tests/html-test.js b/toolkit/components/microformats/test/module-tests/html-test.js deleted file mode 100644 index cd06c7b7f..000000000 --- a/toolkit/components/microformats/test/module-tests/html-test.js +++ /dev/null @@ -1,50 +0,0 @@ -/* -Unit test for html -*/ - -assert = chai.assert; - -// Tests the private Modules.html object -// Modules.html is unit tested as it has an interface access by other modules - -describe('Modules.html', function() { - - - it('parse', function(){ - var html = '<a href="http://glennjones.net">Glenn Jones</a>', - bloghtml = '<section id="content" class="body"><ol id="posts-list" class="h-feed"><li><article class="h-entry"><header><h2 class="p-namee"><a href="#" rel="bookmark" title="Permalink to this POST TITLE">This be the title</a></h2></header><footer class="post-info"><abbr class="dt-published" title="2005-10-10T14:07:00-07:00">10th October 2005</abbr><address class="h-card p-author">By <a class="u-url p-name" href="#">Enrique RamÃrez</a></address></footer><div class="e-content"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque venenatis nunc vitae libero iaculis elementum. Nullam et justo <a href="#">non sapien</a> dapibus blandit nec et leo. Ut ut malesuada tellus.</p></div></article></li></ol></section>', - node = document.createElement('div'); - - node.innerHTML = html; - assert.equal(Modules.html.parse( node ), html ); - - // make sure excludes 'data-include' marked items - var child = document.createElement('p'); - child.setAttribute('data-include', 'true'); - node.appendChild(child); - assert.equal( Modules.html.parse( node ), html ); - - node = document.createElement('div'); - node.innerHTML = bloghtml; - assert.equal( Modules.html.parse( node ), bloghtml ); - - node = document.createElement('div'); - assert.equal( Modules.html.parse( node ), '' ); - - child = document.createElement('br'); - node.appendChild(child); - assert.equal( Modules.html.parse( node ), '<br />' ); - - node = document.createComment('test comment'); - assert.equal( Modules.html.parse( node ), '' ); - - }); - - - - - - - - -}); |