diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index d288dfcde5..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/* -bower_components/* diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..4046195b53 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Code owners for Polymer +* @sorvell @kevinpschaaf @TimvdLippe @azakus \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index dcdd713500..8d68054f92 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,6 +1,6 @@ @@ -9,8 +9,11 @@ If you are asking a question rather than filing a bug, try one of these instead: #### Live Demo - -http://jsbin.com/luhaxab/1/edit + +https://jsbin.com/luhaxab/1/edit + +https://glitch.com/edit/#!/polymer-repro?path=my-element.html:2:0 + #### Steps to Reproduce + + + + + @@ -129,6 +147,20 @@ }); }); + test('shouldPropertiesChange', function(done) { + const el = document.createElement('should-properties-change'); + document.body.appendChild(el); + assert.isTrue(el._propertiesChanged.calledOnce); + el._invalidateProperties(); + setTimeout(function() { + assert.isTrue(el._propertiesChanged.calledTwice); + el._setProperty('foo', true); + setTimeout(function() { + assert.isTrue(el._propertiesChanged.calledThrice); + done(); + }); + }); + }); }); diff --git a/test/unit/property-effects-elements.html b/test/unit/property-effects-elements.html index 1a52caf3c7..aeeee70e43 100644 --- a/test/unit/property-effects-elements.html +++ b/test/unit/property-effects-elements.html @@ -1038,4 +1038,27 @@ this.xChanged = sinon.spy(); } }); - \ No newline at end of file + + + diff --git a/test/unit/property-effects.html b/test/unit/property-effects.html index 3e18d333af..2a7581fbb5 100644 --- a/test/unit/property-effects.html +++ b/test/unit/property-effects.html @@ -409,6 +409,16 @@ } }); + suite('observer inheritance', function() { + setup(function() { + el = document.createElement('sub-observer-element'); + document.body.appendChild(el); + }); + + test('does not invoke observer twice', function() { + assert.equal(el.__observerCalled, 1); + }); + }); }); suite('computed bindings with dynamic functions', function() { diff --git a/test/unit/resolveurl.html b/test/unit/resolveurl.html index 8b08f692d3..703e20c13d 100644 --- a/test/unit/resolveurl.html +++ b/test/unit/resolveurl.html @@ -55,19 +55,25 @@ test('Urls in styles and attributes', function() { var el = document.createElement('p-r'); document.body.appendChild(el); - var rx = /sub\/foo\.z/; + var resolvedUrl = /sub\/foo\.z/; + var styleHashUrl = /url\('#bar'\)/; + var styleAbsUrl = /url\('\/zot'\)/; var style = el.shadowRoot.querySelector('style') || document.querySelector('style[scope=p-r]'); - assert.match(style.textContent, rx, 'url not relative to main document'); - assert.match(el.$.div.getAttribute('style'), rx, 'style url not relative to main document'); - assert.match(el.$.img.src, rx, 'src url not relative to main document'); - assert.match(el.$.a.href, rx, 'href url not relative to main document'); - assert.match(el.$.import.getAttribute('url'), rx, 'url url not relative to main document'); - assert.match(el.$.resolveUrl.getAttribute('url'), rx, 'url url not relative to main document'); - assert.notMatch(el.$.root.getAttribute('url'), rx, 'url url not relative to main document'); - assert.notMatch(el.$.rel.href, rx, 'relative href url not relative to main document'); + assert.match(style.textContent, resolvedUrl, 'url not relative to main document'); + assert.match(style.textContent, styleHashUrl, 'hash url incorrectly resolved'); + assert.match(style.textContent, styleAbsUrl, 'absolute url incorrectly resolved'); + assert.match(el.$.div.getAttribute('style'), resolvedUrl, 'style url not relative to main document'); + assert.match(el.$.img.src, resolvedUrl, 'src url not relative to main document'); + assert.match(el.$.a.href, resolvedUrl, 'href url not relative to main document'); + assert.match(el.$.import.getAttribute('url'), resolvedUrl, 'url url not relative to main document'); + assert.match(el.$.resolveUrl.getAttribute('url'), resolvedUrl, 'url url not relative to main document'); + assert.equal(el.$.resolveUrlHash.getAttribute('url'), '#foo', 'url url not relative to main document'); + assert.equal(el.$.resolveUrlAbs.getAttribute('url'), '/foo', 'url url not relative to main document'); + assert.notMatch(el.$.root.getAttribute('url'), resolvedUrl, 'url url not relative to main document'); + assert.notMatch(el.$.rel.href, resolvedUrl, 'relative href url not relative to main document'); assert.match(el.$.rel.href, /\?123$/, 'relative href does not preserve query string'); assert.equal(el.$.action.getAttribute('action'), 'foo.z', 'action attribute relativized for incorrect element type'); - assert.match(el.$.formAction.action, rx, 'action attribute relativized for incorrect element type'); + assert.match(el.$.formAction.action, resolvedUrl, 'action attribute relativized for incorrect element type'); assert.equal(el.$.hash.getAttribute('href'), '#foo.z', 'hash-only url should not be resolved'); assert.equal(el.$.absolute.getAttribute('href'), '/foo.z', 'absolute urls should not be resolved'); assert.equal(el.$.protocol.getAttribute('href'), 'data:foo.z', 'urls with other protocols should not be resolved'); diff --git a/test/unit/styling-cross-scope-apply.html b/test/unit/styling-cross-scope-apply.html index 9e4ec756e5..8cd5d27906 100644 --- a/test/unit/styling-cross-scope-apply.html +++ b/test/unit/styling-cross-scope-apply.html @@ -588,6 +588,11 @@ }); test('mixins apply to @keyframe rules', function(done) { + if (navigator.userAgent.match('Edge/16') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) { + // skip test due to missing variable support in keyframes + // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12084341/ + this.skip(); + } var xKeyframes1 = styled.$.keyframes1; var xKeyframes2 = styled.$.keyframes2; var completed = 0; diff --git a/test/unit/styling-scoped.html b/test/unit/styling-scoped.html index 6e6d5c5edc..aefc3891f7 100644 --- a/test/unit/styling-scoped.html +++ b/test/unit/styling-scoped.html @@ -859,6 +859,11 @@ }); test('keyframes change scope', function(done) { + if (navigator.userAgent.match('Edge/16') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) { + // skip test due to missing variable support in keyframes + // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12084341/ + this.skip(); + } var xKeyframes = styled.$.keyframes; var onAnimationEnd = function() { diff --git a/test/unit/sub/resolveurl-elements.html b/test/unit/sub/resolveurl-elements.html index b0dc0c7324..de5017d7b1 100644 --- a/test/unit/sub/resolveurl-elements.html +++ b/test/unit/sub/resolveurl-elements.html @@ -13,6 +13,8 @@
@@ -20,6 +22,8 @@ Foo