7 function testClearPinnedItem() {
8 var list
= document
.createElement('ul');
9 list
.style
.position
= 'absolute';
10 list
.style
.width
= '800px';
11 list
.style
.height
= '800px';
12 cr
.ui
.List
.decorate(list
);
13 document
.body
.appendChild(list
);
15 var model
= new cr
.ui
.ArrayDataModel(['Item A', 'Item B']);
16 list
.dataModel
= model
;
17 list
.selectionModel
.setIndexSelected(0, true);
18 list
.selectionModel
.leadIndex
= 0;
19 list
.ensureLeadItemExists();
21 list
.style
.height
= '0px';
24 list
.style
.height
= '800px';
26 assertEquals('Item B',
27 list
.querySelectorAll('li')[0].textContent
);