Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: lib/src/iron-selector/test/basic.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW
« no previous file with comments | « lib/src/iron-selector/test/activate-event.html ('k') | lib/src/iron-selector/test/excluded-local-names.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698