From 94197fa4eecf40d0304f7f46e29ce64005ba25dd Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Mon, 11 Jul 2016 18:27:15 -0700 Subject: [PATCH] Tests function on FF. --- test/unit/shady-content.html | 47 ++++++++++++++++++++++++++++++++++++ test/unit/shady-dynamic.html | 12 +++++++++ 2 files changed, 59 insertions(+) diff --git a/test/unit/shady-content.html b/test/unit/shady-content.html index 9fe9378d..00ee3e9e 100644 --- a/test/unit/shady-content.html +++ b/test/unit/shady-content.html @@ -321,6 +321,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append div to distributing element', function() { var dist = document.createElement('x-dist'); document.body.appendChild(dist); + CustomElements.takeRecords(); // Distribute div var div = document.createElement('div'); Polymer.dom(dist).appendChild(div); @@ -348,6 +349,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append div to non-distributing element', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Distribute div var div = document.createElement('div'); Polymer.dom(noDist).appendChild(div); @@ -377,6 +379,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append div to shady root of distributing element', function() { var dist = document.createElement('x-dist'); document.body.appendChild(dist); + CustomElements.takeRecords(); // Append div to root var div = document.createElement('div'); Polymer.dom(dist.root).appendChild(div); @@ -404,6 +407,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append div to shady root of non-distributing element', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append div to root var div = document.createElement('div'); Polymer.dom(noDist.root).appendChild(div); @@ -431,6 +435,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append div to distributing element in root', function() { var compose = document.createElement('x-compose-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Distribute div var div = document.createElement('div'); Polymer.dom(compose.$.dist).appendChild(div); @@ -458,6 +463,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append div to non-distributing element in root', function() { var compose = document.createElement('x-compose-no-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append div to root var div = document.createElement('div'); Polymer.dom(compose.$.noDist).appendChild(div); @@ -487,6 +493,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content to shady root of element (div first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append div to light dom var div = document.createElement('div'); div.classList.add('insert'); @@ -512,6 +519,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content to shady root of element (content first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append content to shady root var content = document.createElement('content'); content.setAttribute('select', '.insert'); @@ -536,6 +544,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content to div in shady root of element (div first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append div to light dom var div = document.createElement('div'); div.classList.add('insert'); @@ -561,6 +570,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content to div in shady root of element (content first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append content to shady root var content = document.createElement('content'); content.setAttribute('select', '.insert'); @@ -585,6 +595,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content in fragment to shady root of element (div first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append div to light dom var div = document.createElement('div'); div.classList.add('insert'); @@ -612,6 +623,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content in fragment to shady root of element (content first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append content to shady root var frag = document.createDocumentFragment(); var content = document.createElement('content'); @@ -638,6 +650,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append wrapped content to shady root of element (div first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append div to light dom var div = document.createElement('div'); div.classList.add('insert'); @@ -668,6 +681,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append wrapped content to shady root of element (content first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append content to shady root var frag = document.createDocumentFragment(); var wrapper = document.createElement('div'); @@ -697,6 +711,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append wrapped content to div in shady root of element (div first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append div to light dom var div = document.createElement('div'); div.classList.add('insert'); @@ -727,6 +742,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append wrapped content to div in shady root of element (content first)', function() { var noDist = document.createElement('x-no-dist'); document.body.appendChild(noDist); + CustomElements.takeRecords(); // Append content to shady root var frag = document.createDocumentFragment(); var wrapper = document.createElement('div'); @@ -756,6 +772,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content to non-distributing element in shady root of composed element (div first)', function() { var compose = document.createElement('x-compose-no-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append content to light DOM of non-distributing element var div = document.createElement('div'); div.classList.add('insert'); @@ -783,6 +800,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content to non-distributing element in shady root of composed element (content first)', function() { var compose = document.createElement('x-compose-no-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append content to light DOM of non-distributing element var content = document.createElement('content'); content.setAttribute('select', '.insert'); @@ -809,6 +827,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append wrapped content to non-distributing element in shady root of composed element (div first)', function() { var compose = document.createElement('x-compose-no-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append div to light dom var div = document.createElement('div'); div.classList.add('insert'); @@ -840,6 +859,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append wrapped content to non-distributing element in shady root of composed element (content first)', function() { var compose = document.createElement('x-compose-no-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append content to shady root var frag = document.createDocumentFragment(); var wrapper = document.createElement('div'); @@ -870,6 +890,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content to distributing element in shady root of composed element (div first)', function() { var compose = document.createElement('x-compose-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append content to light DOM of non-distributing element var div = document.createElement('div'); div.classList.add('insert'); @@ -895,6 +916,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append content to distributing element in shady root of composed element (content first)', function() { var compose = document.createElement('x-compose-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append content to non-distributing element var content = document.createElement('content'); content.setAttribute('select', '.insert'); @@ -919,6 +941,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append wrapped content to distributing element in shady root of composed element (div first)', function() { var compose = document.createElement('x-compose-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append div to light dom var div = document.createElement('div'); div.classList.add('insert'); @@ -949,6 +972,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('append wrapped content to distributing element in shady root of composed element (content first)', function() { var compose = document.createElement('x-compose-dist'); document.body.appendChild(compose); + CustomElements.takeRecords(); // Append content to shady root var frag = document.createDocumentFragment(); var wrapper = document.createElement('div'); @@ -991,6 +1015,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('composed children distributed', function() { var host = document.createElement('x-dist'); document.body.appendChild(host); + CustomElements.takeRecords(); var s0 = document.createElement('span'); var frag = document.createDocumentFragment(); var s1 = document.createElement('span'); @@ -1031,6 +1056,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('composed children added but not distributed', function() { var host = document.createElement('x-dist'); document.body.appendChild(host); + CustomElements.takeRecords(); var s0 = document.createElement('span'); var frag = document.createDocumentFragment(); var s1 = document.createElement('span'); @@ -1073,6 +1099,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h2 = document.createElement('x-dist'); document.body.appendChild(h1); document.body.appendChild(h2); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = document.createElement('div'); Polymer.dom(h1).appendChild(d); @@ -1114,6 +1141,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h2 = document.createElement('x-dist'); document.body.appendChild(div); document.body.appendChild(h2); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = Polymer.dom(h1).firstElementChild; assert.equal(d.localName, 'div'); @@ -1151,6 +1179,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h1 = document.createElement('x-dist'); var h2 = createPatchedDocumentFragment(); document.body.appendChild(h1); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = document.createElement('div'); Polymer.dom(h1).appendChild(d); @@ -1186,6 +1215,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h1 = div.firstChild; var h2 = createPatchedDocumentFragment();; document.body.appendChild(h1); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = Polymer.dom(h1).firstElementChild; assert.equal(d.localName, 'div'); @@ -1219,6 +1249,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h2 = document.createElement('x-dist-inside-deep-tree'); document.body.appendChild(h1); document.body.appendChild(h2); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = document.createElement('div'); Polymer.dom(h1).appendChild(d); @@ -1260,6 +1291,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h2 = document.createElement('x-dist-inside-deep-tree'); document.body.appendChild(div); document.body.appendChild(h2); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = Polymer.dom(h1).firstElementChild; assert.equal(d.localName, 'div'); @@ -1297,6 +1329,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h1 = document.createElement('x-dist-inside-deep-tree'); var h2 = createPatchedDocumentFragment(); document.body.appendChild(h1); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = document.createElement('div'); Polymer.dom(h1).appendChild(d); @@ -1332,6 +1365,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h1 = div.firstChild; var h2 = createPatchedDocumentFragment(); document.body.appendChild(h1); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = Polymer.dom(h1).firstElementChild; assert.equal(d.localName, 'div'); @@ -1364,6 +1398,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h1 = document.createElement('x-dist-simple'); var h2 = createPatchedDocumentFragment(); document.body.appendChild(h1); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = document.createElement('div'); Polymer.dom(h1).appendChild(d); @@ -1399,6 +1434,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var h1 = div.firstChild; var h2 = createPatchedDocumentFragment(); document.body.appendChild(h1); + CustomElements.takeRecords(); Polymer.dom.flush(); var d = Polymer.dom(h1).firstElementChild; assert.equal(d.localName, 'div'); @@ -1474,6 +1510,7 @@ 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'); document.body.appendChild(x); + CustomElements.takeRecords(); var frag = document.createDocumentFragment(); var t = document.createTextNode('hi'); var d = document.createElement('div'); @@ -1491,6 +1528,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var x = document.createElement('x-dist-star'); var t = document.createTextNode('hi'); document.body.appendChild(t); + CustomElements.takeRecords(); Polymer.dom(x).appendChild(t); Polymer.dom.flush(); assert.equal(Polymer.dom(t).parentNode, x); @@ -1506,6 +1544,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('remove, append first content', function() { var el = document.createElement('x-multi-dist'); document.body.appendChild(el); + CustomElements.takeRecords(); // Append div var div = document.createElement('div'); Polymer.dom(el).appendChild(div); @@ -1533,6 +1572,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('remove, append first distributing element', function() { var el = document.createElement('x-multi-dist'); document.body.appendChild(el); + CustomElements.takeRecords(); // Append div var div = document.createElement('div'); Polymer.dom(el).appendChild(div); @@ -1565,6 +1605,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('move first distributing element', function() { var el = document.createElement('x-multi-dist'); document.body.appendChild(el); + CustomElements.takeRecords(); // Append div var div = document.createElement('div'); Polymer.dom(el).appendChild(div); @@ -1591,6 +1632,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('x-dynamic-content', function() { var el = document.createElement('x-dynamic-content'); document.body.appendChild(el); + CustomElements.takeRecords(); var div = document.createElement('div'); div.classList.add('insert'); Polymer.dom(el).appendChild(div); @@ -1609,6 +1651,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('x-dynamic-content-wrapped', function() { var el = document.createElement('x-dynamic-content-wrapped'); document.body.appendChild(el); + CustomElements.takeRecords(); var div = document.createElement('div'); div.classList.add('insert'); Polymer.dom(el).appendChild(div); @@ -1627,6 +1670,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('x-dynamic-content-redist', function() { var el = document.createElement('x-dynamic-content-redist'); document.body.appendChild(el); + CustomElements.takeRecords(); var div = document.createElement('div'); div.classList.add('insert'); Polymer.dom(el).appendChild(div); @@ -1646,6 +1690,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('x-dynamic-content-redist-element', function() { var el = document.createElement('x-dynamic-content-redist-element'); document.body.appendChild(el); + CustomElements.takeRecords(); var div = document.createElement('div'); div.classList.add('insert'); Polymer.dom(el).appendChild(div); @@ -1664,6 +1709,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('x-toggle-if', function() { var el = document.createElement('x-toggle-if'); document.body.appendChild(el); + CustomElements.takeRecords(); var c1 = document.createElement('div'); c1.id = 'one'; Polymer.dom(el).appendChild(c1); @@ -1715,6 +1761,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN test('x-dynamic-content-and-dynamic-no-content', function() { var el = document.createElement('x-dynamic-content-and-dynamic-no-content'); document.body.appendChild(el); + CustomElements.takeRecords(); var c1 = document.createElement('div'); c1.id = 'one'; Polymer.dom(el).appendChild(c1); diff --git a/test/unit/shady-dynamic.html b/test/unit/shady-dynamic.html index 42d46c86..86898f9c 100644 --- a/test/unit/shady-dynamic.html +++ b/test/unit/shady-dynamic.html @@ -17,6 +17,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + +