| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |