Index: sky/tests/framework/templates.sky |
diff --git a/sky/tests/framework/templates.sky b/sky/tests/framework/templates.sky |
index 747d9067bff71d70b43f2a2a51e799493b0bb11b..99047f017d88d07ad238917afaa5b2444bfd30d5 100644 |
--- a/sky/tests/framework/templates.sky |
+++ b/sky/tests/framework/templates.sky |
@@ -1,12 +1,28 @@ |
<sky> |
<import src="/sky/tests//resources/chai.sky" /> |
<import src="/sky/tests/resources/mocha.sky" /> |
+<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> |
<import src="/sky/tests/resources/test-element.sky" as="TestElement" /> |
<div id="sandbox"></div> |
<test-element id="parser-element" checked="true" size="10" name="foo bar" /> |
+<sky-element name="test-element-parent"> |
+ <template> |
+ <test-element size="{{ size }}" /> |
+ </template> |
+ <script> |
+ (class extends SkyElement { |
+ created() { |
+ this.size = 10; |
+ } |
+ }).register(); |
+ </script> |
+</sky-element> |
+ |
+<test-element-parent id="parent" /> |
+ |
<script> |
describe("SkyElement", function() { |
var element; |
@@ -187,6 +203,14 @@ describe("SkyElement", function() { |
assert.equal(element.lastEvent, event); |
}); |
+ it("should not call attributeChanged for binding expression values", function() { |
+ var parent = document.getElementById('parent'); |
+ var element = parent.shadowRoot.querySelector('test-element'); |
+ assert.deepEqual(element.changes, [ |
+ { name: 'size', oldValue: 0, newValue: 10 }, |
+ ]); |
+ }); |
+ |
it("should call shadowRootReady after creating the template instance", function() { |
assert.equal(element.shadowRootReadyCount, 0); |
sandbox.appendChild(element); |