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

Side by Side Diff: lib/src/iron-list/test/mutations.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
« no previous file with comments | « lib/src/iron-list/test/hidden-list.html ('k') | lib/src/iron-list/test/physical-count.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <!-- 2 <!--
3 @license 3 @license
4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE 5 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE
6 The complete set of authors may be found at http://polymer.github.io/AUTHORS 6 The complete set of authors may be found at http://polymer.github.io/AUTHORS
7 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS 7 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS
8 Code distributed by Google as part of the polymer project is also 8 Code distributed by Google as part of the polymer project is also
9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS 9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS
10 --> 10 -->
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 list.items = buildDataSet(setSize); 147 list.items = buildDataSet(setSize);
148 148
149 list.splice('items', 0, setSize, buildItem(phrase)); 149 list.splice('items', 0, setSize, buildItem(phrase));
150 150
151 flush(function() { 151 flush(function() {
152 assert.equal(list.items.length, 1); 152 assert.equal(list.items.length, 1);
153 assert.equal(getFirstItemFromList(list).textContent, phrase); 153 assert.equal(getFirstItemFromList(list).textContent, phrase);
154 done(); 154 done();
155 }); 155 });
156 }); 156 });
157
158 test('delete item and scroll to bottom', function() {
159 var setSize = 100, index;
160
161 list.items = buildDataSet(setSize);
162
163 while (list.items.length > 10) {
164 index = parseInt(list.items.length * Math.random());
165 list.arrayDelete('items', list.items[index]);
166 list.scrollToIndex(list.items.length - 1);
167 assert.isTrue(/^[0-9]*$/.test(getFirstItemFromList(list).textContent)) ;
168 }
169 });
170
157 }); 171 });
158 </script> 172 </script>
159 173
160 </body> 174 </body>
161 </html> 175 </html>
OLDNEW
« no previous file with comments | « lib/src/iron-list/test/hidden-list.html ('k') | lib/src/iron-list/test/physical-count.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698