mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
improve test.
This commit is contained in:
parent
aa14687250
commit
d70c40ab05
@ -1446,11 +1446,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
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 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
suite('multi-content mutations', function() {
|
||||
|
||||
test('remove, append first content', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user