From d70c40ab051e903eea3210bfc50d8188db0e215b Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Fri, 22 Jan 2016 18:22:38 -0800 Subject: [PATCH] improve test. --- test/unit/polymer-dom-content.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/unit/polymer-dom-content.html b/test/unit/polymer-dom-content.html index fd2bcdaa6b..61b8a0a224 100644 --- a/test/unit/polymer-dom-content.html +++ b/test/unit/polymer-dom-content.html @@ -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() { @@ -1467,8 +1471,6 @@ }); - - suite('multi-content mutations', function() { test('remove, append first content', function() {