Skip to content

Commit

Permalink
improve test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Jan 23, 2016
1 parent aa14687 commit d70c40a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/unit/polymer-dom-content.html
Expand Up @@ -1446,11 +1446,15 @@
test('adding a document fragment clears nodes in the fragment', function() {
var x = document.createElement('x-dist-star');
var frag = document.createDocumentFragment();
frag.appendChild(document.createTextNode('hi'));
frag.appendChild(document.createElement('div'));
var t = document.createTextNode('hi');
var d = document.createElement('div');
frag.appendChild(t);
frag.appendChild(d);
Polymer.dom(x).appendChild(frag);
Polymer.dom.flush();
assert.equal(frag.childNodes.length, 0);
assert.equal(Polymer.dom(t).parentNode, x, 'logical parent wrong');
assert.equal(Polymer.dom(d).parentNode, x, 'logical parent wrong');
assert.equal(frag.childNodes.length, 0, 'fragment not empty');
});

test('adding a non-distributing node removes the node from its current location', function() {
Expand All @@ -1467,8 +1471,6 @@

});



suite('multi-content mutations', function() {

test('remove, append first content', function() {
Expand Down

0 comments on commit d70c40a

Please sign in to comment.