| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --> | 9 --> |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 Polymer.Base.async(function() { | 158 Polymer.Base.async(function() { |
| 159 s2.removeChild(newItem); | 159 s2.removeChild(newItem); |
| 160 | 160 |
| 161 Polymer.Base.async(function() { | 161 Polymer.Base.async(function() { |
| 162 expect(changeCount).to.be.equal(2); | 162 expect(changeCount).to.be.equal(2); |
| 163 done(); | 163 done(); |
| 164 }, 1); | 164 }, 1); |
| 165 }, 1); | 165 }, 1); |
| 166 }); | 166 }); |
| 167 }); | 167 }); |
| 168 |
| 169 suite('dynamic selector', function() { |
| 170 test('selects dynamically added child automatically', function(done) { |
| 171 var selector = document.createElement('iron-selector'); |
| 172 var child = document.createElement('div'); |
| 173 |
| 174 selector.selected = '0'; |
| 175 child.textContent = 'Item 0'; |
| 176 |
| 177 Polymer.dom(selector).appendChild(child); |
| 178 document.body.appendChild(selector); |
| 179 |
| 180 Polymer.Base.async(function() { |
| 181 assert.equal(child.className, 'iron-selected'); |
| 182 document.body.removeChild(selector); |
| 183 done(); |
| 184 }, 1); |
| 185 }); |
| 186 }); |
| 168 }); | 187 }); |
| 169 | 188 |
| 170 </script> | 189 </script> |
| 171 | 190 |
| 172 </body> | 191 </body> |
| 173 </html> | 192 </html> |
| OLD | NEW |