|
54 | 54 | <template> |
55 | 55 | <mm-template-finder template-finder="{{templateFinder}}" template-findable="{{templateFindable}}"> |
56 | 56 | <content select="template"></content> |
57 | | - <template is="dom-template" id="internal"> |
| 57 | + <template preserve-content id="internal"> |
58 | 58 | <test-stamping datum="{{obj}}"></test-stamping> |
59 | 59 | </template> |
60 | 60 | </mm-template-finder> |
|
76 | 76 |
|
77 | 77 | <dom-module id="test-patch"> |
78 | 78 | <template> |
79 | | - <template is="dom-template" id="internal"> |
| 79 | + <template preserve-content id="internal"> |
80 | 80 | <test-stamping datum="{{obj}}"></test-stamping> |
81 | 81 | </template> |
82 | 82 | <content></content> |
|
93 | 93 | </script> |
94 | 94 | </dom-module> |
95 | 95 |
|
96 | | - <template is="dom-bind" id="external2"> |
| 96 | + <template id="external2"> |
97 | 97 | <test-stamping datum="{{obj}}"></test-stamping> |
98 | 98 | </template> |
99 | 99 |
|
100 | | - <template is="dom-template" id="external3"> |
| 100 | + <template id="external3"> |
101 | 101 | <test-stamping datum="{{obj}}"></test-stamping> |
102 | 102 | </template> |
103 | 103 |
|
|
110 | 110 | <script> |
111 | 111 | describe("TemplateFindable", function() { |
112 | 112 |
|
113 | | - it("should propagate changes with custom behavior", function() { |
| 113 | + it("should propagate changes without error", function() { |
114 | 114 | var element = document.querySelector("#test1"); |
115 | 115 | var external = document.querySelector("#external2"); |
116 | 116 | var instance = null; |
117 | 117 | var stamped = null; |
118 | 118 | var model = null; |
119 | 119 | var error = null; |
120 | 120 |
|
121 | | - instance = element.stampTemplate(model = {}); |
| 121 | + instance = element.instantiateTemplateInto(null); |
122 | 122 | instance.set("obj", { input: "text", }); |
| 123 | + instance.render(); // render() is necessary for deep paths to be set() |
123 | 124 |
|
124 | 125 | try { |
125 | 126 | instance.set("obj.input", "nothing"); |
|
134 | 135 | element.set("templateFindable.templateSelector", ""); |
135 | 136 | element.set("templateFindable.templateBind", external); |
136 | 137 |
|
137 | | - instance = element.cloneTemplate(); |
| 138 | + instance = element.instantiateTemplateInto(null); |
138 | 139 | instance.set("obj", { input: "text", }); |
| 140 | + instance.render(); // render() is necessary for deep paths to be set() |
139 | 141 |
|
140 | 142 | try { |
141 | 143 | instance.set("obj.input", "nothing"); |
142 | 144 | } catch (e) { |
143 | 145 | error = error || e; |
144 | 146 | } |
145 | 147 |
|
146 | | - should.not.exist(error); |
| 148 | + should.not.exist(error && error.stack); |
147 | 149 | }); |
148 | 150 |
|
149 | 151 | }); |
|
0 commit comments