diff --git a/test/js/reprojection.js b/test/js/reprojection.js index a343807..a674af2 100644 --- a/test/js/reprojection.js +++ b/test/js/reprojection.js @@ -223,4 +223,43 @@ suite('Shadow DOM reprojection', function() { assert.equal(getVisualInnerHtml(xFoo), '
Hello
'); }); + + test('Issue 460', function() { + // div + // - shadow-root + // -- a + // --- b + // ---- shadow-root + // ----- content + // ---- content (content2) + // - d + + var div = document.createElement('div'); + var sr = div.createShadowRoot(); + var a = sr.appendChild(document.createElement('a')); + var b = a.appendChild(document.createElement('b')); + var sr2 = b.createShadowRoot(); + var content = sr2.appendChild(document.createElement('content')); + var content2 = b.appendChild(document.createElement('content')); + var d = div.appendChild(document.createElement('d')); + + assert.equal(getVisualInnerHtml(div), ''); + + var sr3 = a.createShadowRoot(); + assert.equal(getVisualInnerHtml(div), ''); + + // div + // - shadow-root + // -- a + // --- shadow-root (sr3) + // ---- content (content3) + // --- b + // ---- shadow-root + // ----- content + // ---- content (content2) + // - d + + var content3 = sr3.appendChild(document.createElement('content')); + assert.equal(getVisualInnerHtml(div), ''); + }); }); \ No newline at end of file